An Arabic product line can contain a Latin SKU, punctuation and a stock message. The characters are stored in logical order, but the browser applies the bidirectional algorithm when it displays them. A slash, dash or nearby number can appear to belong to the wrong part of the sentence. Reversing the text by hand only makes the underlying data wrong.
Give the code its own direction
If the SKU is known to be left-to-right, tightly wrap the code in an isolated LTR element. Keep the label, sentence punctuation and stock message outside it:
<p dir="rtl" lang="ar">
رقم المنتج: <bdi dir="ltr">AB-123/45</bdi> — متوفر
</p>
The sentence says “Product number: AB-123/45 — available.” Read the Arabic sentence from right to left; read the code itself from left to right. In a browser, the colon belongs to the label and the dash separates the code from the availability message. The SKU's boundary is immediately before A and after 5; it does not include the surrounding spaces or dash.
To see the boundary during review, temporarily add bdi { outline: 2px solid limegreen; }. In this Safari capture the outline encloses the SKU alone. The label stays to its right and the dash and stock message stay to its left. Remove the diagnostic outline before export.
The outer dir="rtl" establishes the sentence direction. bdi dir="ltr" sets the known code direction and isolates the inline run. A tightly wrapped <span dir="ltr"> is also valid in modern HTML. The W3C inline bidi guidance explains both direction and isolation.
Unknown direction is a different case
If a value comes from a source that can contain Arabic or Latin and its direction is genuinely unknown, <bdi>value</bdi> defaults to automatic direction. Alternatively, put dir="auto" on an existing tight wrapper. The browser uses the first strong directional character; leading punctuation and digits do not decide it. A value with no strong character, or one whose first strong character does not represent the intended direction, needs a direction supplied by the data contract instead. See the HTML Standard on bdi.
When markup is unavailable
For a plain-text destination that supports Unicode bidi isolates, place U+2066 LEFT-TO-RIGHT ISOLATE before the SKU and U+2069 POP DIRECTIONAL ISOLATE immediately after it. These are invisible characters; the notation names code points, not literal text to paste. Test that the destination preserves and renders them before relying on this fallback. Prefer markup in HTML. W3C's Unicode controls guide explains the pairing and its limits.
Check the delivered line
Render the actual translation in the destination browser or creative tool. Check the SKU character by character, the punctuation on both sides, a nearby number, and a line wrap at the real width. Copy the code back out and compare it with the source value. Repeat after export: a flattened image can look correct while the source text is wrong, and a different renderer may handle controls differently. If the destination strips markup or controls, resolve that limitation in its own text workflow instead of manually reversing the SKU.