A right-to-left interface can contain left-to-right identifiers and user-entered names. The prompt should preserve the identifier bytes, state the base direction, and ask for the rendered ordering to be checked in context. String reversal is not localization. Markup or component behavior must isolate a mixed-direction token where needed; punctuation around it may otherwise appear in a confusing position. A text-only model can suggest test cases, but the browser render and assistive interaction determine whether the actual notice remains intelligible.
Localization prompts: test mixed-direction identifiers
Operational case
HP-18 places parcel code PK-47A next to right-to-left notice text. In the first build, punctuation appears detached from the code in one message state. Harbor keeps the code unchanged and repairs the component's direction handling around the inserted value. The reviewer checks the short code, a longer code, and a recipient name with mixed-script characters. The fix is accepted only after those values render correctly in the actual notice surface.
HP-18 | base direction: right-to-left
Inserted token: PK-47A, exact bytes retained
Observed: adjacent punctuation rendered ambiguously
Repair target: isolate inserted token in the component
Retest: short, long, and mixed-script valuesPerformance and review cost
Testing K inserted-token shapes over S message states costs O(KS) render checks. Most code changes are in one shared component, but each distinct insertion context still needs a check. A screenshot can document visual order; keyboard selection and spoken behavior may require separate inspection when they affect the user task.
Common Mistakes
- Do not reverse the identifier characters.
- Do not assume a translated string fixes component direction handling.
- Do not test only one short Latin code.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Mixed-language requests: separate intent from reply language
- UI release prompts: compare appearance and verify access
- Localization prompts: define the locale and message contract
- Localization prompts: preserve variables and plural branches
- Localization prompts: render typed dates, numbers, and units
- Localization prompts: reconcile terminology and tone
- Localization prompts: use pseudolocale and real layout checks
- Localization prompts: gate release on catalog and rendered retests
- Project: review Harbor's localized delivery notices
- Localization QA prompt decisions
