Skip to content
OAIT Design System

Design system / Foundations

Languages and RTL

How every OAIT product works in English, Arabic, and French: which languages each product ships, how a language is chosen and remembered, how a page turns round for Arabic, how text that mixes directions stays readable, and how numbers, dates, money, phones, and codes are written.

The rules come from the canonical rules §14, §3.6, §3.7, §8.3, §10.28, §12.6, and §13, and from the decisions D-BCP-03, D-BCP-19, D-BCP-22, D-BCP-27 to D-BCP-30, D-TYP-12, D-TYP-14 to D-TYP-16, D-CSN-39, and C-7 in the decision log. Arabic type values are in the token reference, Type overrides — Arabic. Words, tone, punctuation, and the glossary of actions are in Content and voice.

On this page:

Rules in brief

  1. Three languages, two of them complete everywhere. The system supports English, Arabic, and French in full. Every product ships English and Arabic complete, with no untranslated chrome, <title>, accessible name, or error message (D-BCP-27).
  2. Content-led products keep the language in the path; app-led products keep it out of the URL. Paths are always prefixed (/en/…, /ar/…, /fr/…). App-led products read the signed-in account's language, then the family cookie oait_locale. Nothing reads Accept-Language (D-BCP-28).
  3. One switcher, named in endonyms. English, العربية, Français, each in its own script, first in the header's end cluster, inside the phone menu sheet, and at the end of the footer (D-BCP-29, D-CSN-39, C-7).
  4. The server renders <html lang dir>. dir="rtl" for Arabic only; every part in another language carries its own lang (D-BCP-30, canonical §13).
  5. Logical properties only. The page turns round with dir; never mirror with row-reverse or order (D-BCP-30).
  6. Mirror by registry. Directional icons flip from one list; marks, ID-card faces, media controls, clocks, checks, numbers, phones, and codes never do (D-BCP-33, canonical §14.2).
  7. Isolate every Latin run inside Arabic. Product names, emails, URLs, phones, IDs, codes, and signed numbers go in <bdi>; plain text uses U+2066 … U+2069 (D-BCP-03, D-BCP-30).
  8. Format with Intl, never by hand. English en-GB, Arabic ar-u-nu-latn, French fr; Western digits in every language; never ar-LB (D-BCP-19, D-TYP-12, D-TYP-16).
  9. Day-first dates, the 24-hour clock, money by ISO code, phones in E.164 (D-BCP-19, D-TYP-16).
  10. Arabic and French typography come with the tokens and the catalogs. The :lang(ar) block ships in oait.css and tailwind.css; French spacing lives in the French catalog; every new Arabic and French string gets native review before release (D-TYP-14, D-TYP-15, D-BCP-22, D-ARC-29).

Languages per product

Product Kind Today Target The language is kept in (target)
oait.app content-led, the umbrella English at /, Arabic at /ar; plain links, no cookie English and Arabic; French optional the path, always prefixed: /en/…, /ar/…
Global ID app-led, the identity layer English, Arabic, and French (3,826 English strings, each translated); cookie gid_locale English, Arabic, French the account, then oait_locale
Global Jobs content-led English and Arabic at /en/… and /ar/…, every page with a twin at the same path English and Arabic; French optional the path, as today
Global Games app-led English and Arabic; cookie gg_locale set by POST /api/locale English, Arabic, and French (recommended) the account, then oait_locale
Tamakkan landing content-led English only (/ar is a 404) English and Arabic the path: /en, /ar
Tamakkan app app-led Arabic, English, and French dictionaries, with much chrome left in English; chosen with language cards, a select, or the account English, Arabic, French the account, then the family's oait_locale cookie
Global Security, Tasks, Events, Tests app-led, not yet audited — English and Arabic, and French (recommended), from their first release the account, then oait_locale
  • Complete means complete. Chrome, document titles, accessible names, hidden text, errors, and emails are translated before a language ships (D-BCP-27). The audit found the gaps this rule closes: Games' landing eyebrow and its /training, /owner, and /demo titles in English on Arabic pages; Jobs' "Sign in with Global ID" circle named in English on /ar; Tamakkan's header links, "Sign Out", and "Loading..." in English, with its /hbdi in English only (TK-1.13).
  • French is supported by every token, style, component, and pattern; whether a product ships it is the client call below.
  • The order of languages is always English, العربية, Français: in switchers, in catalogs, and in tests (D-BCP-29).

How the language is kept

Two kinds of product, one memory (D-BCP-28).

Content-led App-led
Products oait.app, Global Jobs, Tamakkan's landing Global ID, Global Games, Security, Tasks, Events, Tests, Tamakkan's app
Why public pages are indexed, so each language needs its own address signed-in and installed: OIDC redirect URIs, the PWA start_url, and deep links must not change with the language
Source of truth the first path segment the signed-in account's saved language, then the cookie
Addresses always prefixed: /en/…, /ar/…, /fr/…; English is never the unmarked default no language in any URL
/ redirects (302) to the remembered language, or to /en the product's home
hreflang every language version, plus x-default pointing to / none
Switching keeps the rest of the path and the query keeps the page and re-renders it
Set-Cookie: oait_locale=ar; Domain=oait.app; Path=/; Max-Age=31536000; SameSite=Lax; Secure
  • One cookie, written by every switcher: oait_locale with the value en, ar, or fr, for one year, on Domain=oait.app, so a language chosen in Global ID opens Global Games in the same language. Tamakkan, at tamakkan.oait.app, is covered by the same cookie (D-BCP-45) (canonical §14.1, D-BCP-28).
  • Validate it on the server against the languages the product ships. A missing, unknown, or unsupported value means English: someone who chose French in Global ID opens Global Jobs in English while Jobs ships English and Arabic only.
  • The account wins. A signed-in person's saved language overrides the cookie in app-led products.
  • Old cookies. Global ID's gid_locale and Games' gg_locale are still read for 12 months, then retired (ID-2.37, GG-2.25).
  • No automatic detection. Never read Accept-Language and never guess from location: the first visit is English, and the switcher is always in view (D-BCP-28).

The resolver every app-led product needs, after Global ID's src/i18n/locales.ts:

// locale.ts: plain data and functions, so client components such as the switcher may import it too.
export const locales = ['en', 'ar', 'fr'] as const // list only the languages this product ships
export type Locale = (typeof locales)[number]

export const localeCookie = 'oait_locale'
export const legacyLocaleCookie = 'gid_locale' // Games: 'gg_locale'. Remove 12 months after the switch.

/** True for a language the product ships, and for nothing else. Use it on anything from outside. */
export function isLocale(value: unknown): value is Locale {
  return locales.some((locale) => locale === value)
}

/** The page language: the account's choice, then the family cookie, then the old cookie, then English. */
export function resolveLocale(account?: string, cookie?: string, legacy?: string): Locale {
  for (const value of [account, cookie, legacy]) if (isLocale(value)) return value
  return 'en'
}

/** Arabic is the only right-to-left language. */
export function dirFor(locale: Locale): 'ltr' | 'rtl' {
  return locale === 'ar' ? 'rtl' : 'ltr'
}

A content-led product lists every language version of a page in <head>, here the Global Jobs home:

<link rel="alternate" hreflang="en" href="https://jobs.oait.app/en">
<link rel="alternate" hreflang="ar" href="https://jobs.oait.app/ar">
<link rel="alternate" hreflang="x-default" href="https://jobs.oait.app/">
  • Product note (Global ID): the language menu calls a server action that sets the cookie and redraws the page; next-intl loads the catalog for each request, with no locale routing and no middleware step.
  • Product note (Tamakkan): the app sets lang, dir, and body[data-lang] from JavaScript after load. Its landing moves to /en and /ar, and its app to the switcher and the cookie (TK-2.25). How its Vite build serves <html lang dir> with the first response is not settled yet.

The language switcher

One component in every header and footer. The full anatomy, sizes, states, and markup are on Language switcher, whose CSS sizes the icons; this is the contract (canonical §10.28, D-BCP-29, D-CSN-39, C-7).

Three languages Two languages
Element a disclosure: a button with aria-expanded and aria-controls, and a list in the Tab order; never an ARIA menu a direct link to the other language (URL products) or a button (cookie products)
Shows the translate icon at icon-md (20px), the current language in its own script, and arrow_drop_down; icon-only below 768px (icon-lg, 24px, in a 48 × 48px button) translate, the other language in its own script (<span lang="ar">العربية</span>), and visually hidden "Switch to Arabic" in the page's language; a 48px pill in label-md
Accessible name "Language: English" / "اللغة: العربية" / "Langue : Français" starts with the visible endonym, then the hidden words
Options every language in its own script, each with lang (and hreflang on links), in the order English, العربية, Français; the current one has aria-current="true" and a 20px check; the list composes the menu classes (oa-menu, oa-menu__item), so it draws on surface-raised with 48px items in body-lg —
  • Endonyms only. Name every language in its own language and script, the language a person switches to: "العربية", never "Arabic" or "Arabe"; "Français", never "French" or "الفرنسية" (D-BCP-29).
  • Placement. First in the header's end cluster; below 640px inside the phone menu sheet (a header with no menu keeps it in the bar: the three-language trigger as a 48px icon button below 768px, the two-language toggle with its endonym at every width); at the inline end of the footer's legal bar, where its list opens upward; on sign-in pages and in app shells, at the end of the top app bar beside the account control. Never only in the footer (canonical §10.14, §10.15, §10.16).
  • Behavior. It keeps the page, the path, the query, and what the person has typed where it can; it writes oait_locale; the page re-renders with the new lang and dir. Escape closes the list and returns focus to the trigger (canonical §10.20, §10.28; D-BCP-29).
  • Failure. A snackbar says "We couldn’t change the language. Try again." / "تعذّر تغيير اللغة. حاول مرة أخرى." / "Impossible de changer la langue. Réessayez." (Global ID's strings) (Snackbar).
<!-- Two languages, URL product: Global Jobs, English page -->
<a class="oa-lang oa-lang--two" href="/ar/jobs" hreflang="ar">
  <span class="oa-icon" aria-hidden="true" translate="no">translate</span>
  <span lang="ar">العربية</span><span class="oa-visually-hidden">Switch to Arabic</span>
</a>

<!-- The Arabic page links back, with the hidden words in Arabic (Global Jobs) -->
<a class="oa-lang oa-lang--two" href="/en/jobs" hreflang="en">
  <span class="oa-icon" aria-hidden="true" translate="no">translate</span>
  <span lang="en">English</span><span class="oa-visually-hidden">التبديل إلى الإنجليزية</span>
</a>

<!-- Three languages, cookie product: Global ID, Arabic page, list open. Options are buttons.
     The list composes the menu classes; every option carries the check, which shows only on aria-current. -->
<div class="oa-lang">
  <button class="oa-lang__trigger" type="button" aria-label="اللغة: العربية" aria-expanded="true" aria-controls="lang-options">
    <span class="oa-icon" aria-hidden="true" translate="no">translate</span>
    <span class="oa-lang__current">العربية</span>
    <span class="oa-icon" aria-hidden="true" translate="no">arrow_drop_down</span>
  </button>
  <ul class="oa-lang__list oa-menu" id="lang-options">
    <li><button class="oa-lang__option oa-menu__item" type="button" lang="en"><span class="oa-menu__label">English</span><span class="oa-icon oa-menu__check" aria-hidden="true" translate="no">check</span></button></li>
    <li><button class="oa-lang__option oa-menu__item" type="button" lang="ar" aria-current="true"><span class="oa-menu__label">العربية</span><span class="oa-icon oa-menu__check" aria-hidden="true" translate="no">check</span></button></li>
    <li><button class="oa-lang__option oa-menu__item" type="button" lang="fr"><span class="oa-menu__label">Français</span><span class="oa-icon oa-menu__check" aria-hidden="true" translate="no">check</span></button></li>
  </ul>
</div>

Direction and the language of parts

<html lang="en" dir="ltr">
<html lang="ar" dir="rtl">
<html lang="fr" dir="ltr">
  • From the server. <html lang dir> is part of the first response, never set by script after load, so the first paint, screen readers, and the :lang(ar) type block are right from the start. dir="rtl" for Arabic only (D-BCP-30, canonical §13).
  • Language of parts. Every element whose language differs from the page carries lang: product names (lang="en"), the endonyms in the switcher, an Arabic name on an English page, a job posted in the other language (Global Jobs flags it with a "باللغة الإنجليزية" / "In Arabic" badge and tags the text). A whole block in another language also takes dir, or its punctuation lands at the wrong end (canonical §3.7, §13).
  • The type block follows lang, not dir. Arabic line heights apply wherever lang="ar" is set, so an Arabic name inside an English page gets them too; an English island inside an Arabic page inherits the Arabic line heights, which is harmless (canonical §3.7).
  • Objects with a fixed language set their own. The ID card has an English front (lang="en" dir="ltr") and an Arabic back (lang="ar" dir="rtl") whatever the page's language; printed artifacts do the same.
  • Email. dir and lang on both <html> and <body>, and text-align: right written out for Arabic, because mail apps differ on the logical start; subjects isolate Latin runs with U+2066 … U+2069 (canonical §14.2, D-TYP-18).
  • Tailwind's rtl variant (for example rtl:-scale-x-100) is for one-off art transforms only. Layout turns by logical utilities and icons by the registry, so product code rarely needs it. The variant also matches everything inside an Arabic page, a dir="ltr" island included, so an icon there takes oa-icon--mirror instead (Iconography).
  • Product note (Global Jobs): Jobs ships a separate Arabic web app manifest (lang "ar", dir "rtl", start_url "/ar?source=pwa").

Logical properties

The page turns round with dir and nothing else: write every inline-axis property in its logical form (D-BCP-30, canonical §14.2).

Never (physical) CSS Tailwind
margin-left, margin-right margin-inline-start, margin-inline-end ms-4, me-4
padding-left, padding-right padding-inline-start, padding-inline-end ps-4, pe-4
left, right inset-inline-start, inset-inline-end start-0, end-0
text-align: left or right text-align: start or end text-start, text-end
border-left, border-right border-inline-start, border-inline-end border-s, border-e
border-top-left-radius border-start-start-radius rounded-ss-box
float: left float: inline-start float-start
<!-- start and end turn with dir; top and bottom never need to -->
<span class="absolute top-0 -end-10" aria-hidden="true"></span>
<p class="ps-4 border-s border-outline-variant text-start">Accent rules on one side use the inline start.</p>
  • Physical sides only for what must not turn: ID-card faces, media progress, chart value axes, and the safe-area insets on the full-bleed parent. Each such rule carries a comment (canonical §4.10, §14.2):
/* On the full-bleed parent only: the notch is on a physical side of the device */
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
  • Never mirror with row-reverse or order. dir="rtl" already reverses flex rows and grids; a reversal added for Arabic turns them back. In a simulated Arabic render of Tamakkan's app, its stepper and answer rows read left to right for this reason (TK-1.11).
  • Direction selectors only where logical CSS cannot reach. Layout never needs one: spacing, position, alignment, borders, and radii turn with dir. A direction selector (:dir(rtl), with [dir="rtl"] as the fallback) serves only what has no logical form: the icon mirror class in base.css, the 225° art gradient, and transforms such as the hand-drawn underline, card fans, and sheets that slide in from the inline edge. The language selectors are the shipped :lang(ar) type block and the rule that removes uppercase from eyebrows and card-art labels whose own language is Arabic (.oa-eyebrow:lang(ar): an English or French island keeps its capitals) (canonical §3.7, §14.2; D-BCP-30, D-ARC-29).
  • Spacing and sizes stay the same in every language. Text-bearing controls use a minimum height and wrap, never a fixed height or width (Layout).

Mirroring

Mirrors in Arabic How
Directional icons (27 glyphs) the icon registry adds oa-icon--mirror; base.css flips it with [dir="rtl"] .oa-icon--mirror { transform: scaleX(-1) }
135° art gradients 225° in right-to-left pages, so the first stop, which carries the text, stays at the inline start
Card fans, carousels, and the card stack x offsets and rotations negated
Step connectors and progress fills drawn and filled from the inline start
Sheets and menus side sheets slide in from their own inline edge; the phone menu sheet opens from the inline end; menus align to the trigger's inline end
The hand-drawn underline flipped with scaleX(-1)
Arrow keys in tabs and radio groups reversed, so they follow the reading direction (canonical §10.17, §13)
Never mirrors Why
Marks and logos brand artwork: the lock-up's order follows the direction, with the mark at the inline start, but the artwork never flips
ID-card faces fixed faces: English front left to right, Arabic back right to left
Media controls, clocks, and refresh play_arrow, pause, schedule, and refresh mean the same in every script
Check marks and QR codes they mean the same in every script
Numbers, phones, and codes they read left to right in Arabic too
expand_more, expand_less vertical: they turn 180° when open instead
Chart numerals and value axes values read left to right

The registry (canonical §8.3, D-BCP-33):

  • Mirrored: arrow_forward, arrow_back, arrow_forward_ios, arrow_back_ios, chevron_left, chevron_right, navigate_next, navigate_before, first_page, last_page, keyboard_arrow_left, keyboard_arrow_right, north_east, north_west, south_east, south_west, send, reply, forward, undo, redo, login, logout, list, format_list_bulleted, format_indent_increase, format_indent_decrease.
  • Never mirrored: check, close, add, search, translate, home, settings, lock, fingerprint, the QR glyphs, contactless, schedule, refresh, play_arrow, pause, the status glyphs, expand_more, and expand_less.
  • Authors never decide per use. The Icon component holds the list; plain HTML adds oa-icon--mirror to registry glyphs only. A product that needs another directional glyph asks for it to join the registry (D-BCP-33). The full glyph table is in Iconography.
  • Left-to-right islands keep their icons. Inside a dir="ltr" box, such as a phone field, base.css resets the flip.
  • north_east in Arabic points up and to the left, toward the inline end, and still means "leaves the product".
  • Product note (Global ID): Button never passed a mirror to its icon, so "Continue" kept pointing right in Arabic on the vault code screens, and Home's "all apps" arrow too (ID-1.10).

Bidi isolation

Arabic runs right to left; Latin names, addresses, numbers, and codes inside it run left to right. Without isolation the browser reorders the neutral characters around them: Games shows "+2" as "2+" in Arabic today, because the plus sign at the start of a right-to-left run takes the run's direction (GG-1.05). Isolate every left-to-right run (canonical §14.2, D-BCP-30).

Content inside Arabic Markup From the products
Product names <bdi lang="en" translate="no">Global ID</bdi> استخدم Global ID بلغتك. (Global ID)
Emails, URLs, domains <bdi dir="ltr">name@example.com</bdi> <bdi dir="ltr">id.oait.app</bdi> on oait.app's Arabic platform cards
Phones, IDs, codes <bdi dir="ltr" translate="no">GU-25-000123</bdi>; their inputs dir="ltr" <bdi dir="ltr">+961 71 214 723</bdi> on Global ID's profile
Signed numbers, units, numeric dates <bdi dir="ltr">+2</bdi>, <bdi dir="ltr">08 / 2030</bdi> Games' points; the ID card's validity
User content dir="auto", plus lang when the language is known Global ID's guest names on passes; Jobs' postings in the other language
Plain text: <title>, accessible names, notifications, email subjects U+2066 LRI … U+2069 PDI around each Latin run "تسجيل الدخول باستخدام ⁦Global ID⁩", the Arabic accessible name of the Sign in with Global ID kit (canonical §1.8)
  • Product names never break. A product name in <bdi translate="no"> never breaks between its words: base.css sets :where(bdi[translate="no"]) { white-space: nowrap; } (Tailwind: add whitespace-nowrap to that bdi), which keeps "العودة إلى Global ID الخاص بي" readable when the label wraps. That label is "Back to my Global ID", the last item of Global ID's admin navigation drawer (canonical §1.2, §10.1).
<!-- Global ID's admin drawer on an Arabic page: the label may wrap; the product name stays whole -->
<a class="oa-btn oa-btn--outlined oa-btn--wide oa-nav-drawer__back" href="/home">
  <span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">arrow_back</span>
  <span class="oa-btn__label">العودة إلى <bdi lang="en" translate="no">Global ID</bdi> الخاص بي</span>
</a>

How to write the plain-text isolates in source:

Where Write
JSON catalog "تسجيل الدخول باستخدام \u2066Global ID\u2069"
HTML text or attribute &#x2066;Global ID&#x2069;, as in <title>تسجيل الدخول · &#x2066;Global Games&#x2069;</title>
JavaScript the escapes in a template literal, as below
// Global ID's email confirmation page isolates the address it shows
const isolate = (address) => `\u2066${address}\u2069`

oait.app's Arabic home already writes them in prose: "استكشاف تطبيقات ⁦Global⁩ ومنصة تمكّن، من تطوير ⁦OAIT⁩."

  • Inputs. Email, phone, one-time code, password, and URL inputs take dir="ltr", and so does any control box that holds a Latin-only value; Arabic name inputs take dir="rtl" (D-BCP-30, canonical §10.0).
  • Content of unknown direction in plain text. For a person's name or typed text inside an accessible name or a notification, use U+2068 FSI … U+2069 PDI, the plain-text twin of dir="auto". The sources name only the range U+2066 … U+2069; this choice follows the dir="auto" rule for user content.
  • Leave Intl's marks alone. Arabic output from Intl carries invisible direction marks (U+200E before a plus sign and on each side of a percent sign, U+200F at the start of an amount) that keep the parts in order. Never strip or rebuild the string; isolate the whole value in markup as well.
  • Copy buttons copy IDs and codes without spaces (canonical §14.3).
  • Product note (Global ID): phone fields accept Arabic-Indic digits typed on an Arabic phone keyboard (٠–٩) and store Latin digits; CSV imports remove the invisible direction marks that Arabic spreadsheets put around values. The family rules say nothing about input yet; both practices fit the Western-digit and E.164 rules.

Numbers, dates, times, money, phones, and codes

  • Intl for everything. Every date, time, number, amount, percent, and plural goes through Intl or ICU MessageFormat, never through a hand-built string (D-BCP-19).
  • The locale tags are English en-GB, Arabic ar-u-nu-latn, and French fr (canonical §14.3). In code, write -u-nu-latn on all three (en-GB-u-nu-latn, ar-u-nu-latn, fr-u-nu-latn), as canonical §3.6 and Typography do: English and French output is identical either way (checked for every row below).
  • Never ar-LB. It writes Eastern Arabic digits and Levantine month names ("١٬٢٣٤٬٥٦٧٫٥", "٢٧ تشرين الأول ٢٠٢٦"); ar-LB-u-nu-latn keeps Western digits but groups as "1.234.567,5". Only ar-u-nu-latn keeps both the Western digits and the grouping the products show (D-BCP-19, D-TYP-12).
  • Western digits 0–9 in every language, and digits for every quantity in the interface, 1 to 9 included: "7 days", "every 30 seconds", "كل 30 ثانية" (Content and voice) (D-BCP-19).
  • The time zone is Asia/Beirut for anything on campus. Name it when readers may be elsewhere: "15:05 Beirut time" (D-BCP-19, D-TYP-16).
Kind Intl call (with timeZone: 'Asia/Beirut' for dates and times) English Arabic French
Date DateTimeFormat, { dateStyle: 'long' } 27 October 2026 27 أكتوبر 2026 27 octobre 2026
Date with weekday { dateStyle: 'full' } Tuesday, 27 October 2026 الثلاثاء، 27 أكتوبر 2026 mardi 27 octobre 2026
Compact date (tables) { day: 'numeric', month: 'short', year: 'numeric' } 27 Oct 2026 27 أكتوبر 2026 27 oct. 2026
Date range formatRange(from, to) with { dateStyle: 'long' } 27 October – 3 November 2026 27 أكتوبر – 3 نوفمبر 2026 27 octobre – 3 novembre 2026
Date and time { dateStyle: 'long', timeStyle: 'short', hourCycle: 'h23' } 27 October 2026 at 15:05 27 أكتوبر 2026 في 15:05 27 octobre 2026 à 15:05
Relative, within 7 days RelativeTimeFormat, { numeric: 'auto' }, format(-2, 'day') 2 days ago أول أمس avant-hier
Time { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' } 15:05 15:05 15:05
Time range formatRange(from, to) with the time options 08:00–13:00 08:00–13:00 08:00 – 13:00
Number NumberFormat 1,234,567.5 1,234,567.5 1 234 567,5
Percent { style: 'percent' }, format(0.34) 34% 34‎%‎ 34 %
Signed number { signDisplay: 'exceptZero' } +2 ‎+2 +2
Money { style: 'currency', currency: 'USD', maximumFractionDigits: 0 } US$1,200 ‏1,200 US$ 1 200 $US
Money range the same, formatRange(1200, 1800) US$1,200–1,800 ‏1,200–1,800 US$ 1 200–1 800 $US
Lebanese pounds { style: 'currency', currency: 'LBP', maximumFractionDigits: 0 } LBP 1,500,000 ‏1,500,000 ل.ل.‏ 1 500 000 £LB
Counts ICU plural 1 open job · 2 open jobs Arabic plural rules French plural rules
Phone stored in E.164 +961 71 214 723 +961 71 214 723, dir="ltr" +961 71 214 723
IDs and codes as issued GU-25-000123 · 7K3M-Q9TD the same, isolated the same
Card validity ID-card art only 08 / 2030 08 / 2030, dir="ltr" 08 / 2030

Values from the helper below on Node 22 (ICU 78.3, CLDR 48). Intl writes the special spaces itself: French groups digits with U+202F and puts U+00A0 before % and the currency; date ranges in English and French, and French time ranges, put thin spaces (U+2009) around the en dash; Arabic amounts and percents carry the direction marks described above. Never type them, and expect another engine version to differ in these spaces only.

  • Never dateStyle: 'medium'. It is numeric in Arabic ("27‏/10‏/2026"); the compact recipe above is the table date (D-BCP-19).
  • Relative dates only within the last 7 days; older ones show the date ("Posted 2 months ago" becomes the date) (D-BCP-19).
  • Ranges take the en dash: unspaced between numbers and times ("1–3 years", "09:00–14:00") and spaced between dates written with words. formatRange writes both, and its French output spaces time ranges too; keep what it writes (D-BCP-17, D-TYP-16).
  • Money shows the ISO code and whole amounts, with formatRange for ranges; never a bare "$" (Jobs' "$1,200 – 1,800" becomes "US$1,200–1,800", JB-2.20).
  • Format in the page's language. A value on an Arabic page comes from the Arabic tag, so its order, marks, and separators match the words around it.

One formatting helper per product

Every product keeps its formats in one helper built on Intl with the three tags (D-BCP-19):

// format.ts: the product's only formatter. Western digits in every language (canonical §3.6, §14.3).
import type { Locale } from './locale'

const TAG: Record<Locale, string> = { en: 'en-GB-u-nu-latn', ar: 'ar-u-nu-latn', fr: 'fr-u-nu-latn' }
const ZONE = 'Asia/Beirut' // name the zone in the copy when readers may be elsewhere

const date = (locale: Locale, options: Intl.DateTimeFormatOptions) =>
  new Intl.DateTimeFormat(TAG[locale], { timeZone: ZONE, ...options })
const number = (locale: Locale, options?: Intl.NumberFormatOptions) => new Intl.NumberFormat(TAG[locale], options)
const TIME = { hour: '2-digit', minute: '2-digit', hourCycle: 'h23' } as const

export const formatDate = (d: Date, l: Locale) => date(l, { dateStyle: 'long' }).format(d)
export const formatDateWithWeekday = (d: Date, l: Locale) => date(l, { dateStyle: 'full' }).format(d)
export const formatDateCompact = (d: Date, l: Locale) =>
  date(l, { day: 'numeric', month: 'short', year: 'numeric' }).format(d) // tables; never dateStyle 'medium'
export const formatDateRange = (from: Date, to: Date, l: Locale) => date(l, { dateStyle: 'long' }).formatRange(from, to)
export const formatTime = (d: Date, l: Locale) => date(l, TIME).format(d)
export const formatTimeRange = (from: Date, to: Date, l: Locale) => date(l, TIME).formatRange(from, to)
export const formatDateTime = (d: Date, l: Locale) =>
  date(l, { dateStyle: 'long', timeStyle: 'short', hourCycle: 'h23' }).format(d)
export const formatDaysAgo = (days: number, l: Locale) => // only for 0 to 7 days
  new Intl.RelativeTimeFormat(TAG[l], { numeric: 'auto' }).format(-days, 'day')

export const formatNumber = (n: number, l: Locale) => number(l).format(n)
export const formatPercent = (ratio: number, l: Locale) => number(l, { style: 'percent' }).format(ratio)
export const formatSigned = (n: number, l: Locale) => number(l, { signDisplay: 'exceptZero' }).format(n) // "+2"
export const formatMoney = (amount: number, currency: 'USD' | 'LBP', l: Locale) =>
  number(l, { style: 'currency', currency, maximumFractionDigits: 0 }).format(amount)
export const formatMoneyRange = (from: number, to: number, currency: 'USD' | 'LBP', l: Locale) =>
  number(l, { style: 'currency', currency, maximumFractionDigits: 0 }).formatRange(from, to)

/** English lists take the serial comma, which en-GB list formatting leaves out (see Plurals and lists). */
export const formatList = (items: string[], l: Locale) =>
  new Intl.ListFormat(l === 'en' ? 'en-US' : TAG[l], { type: 'conjunction' }).format(items)

Product note (Global ID): newer code formats day first with the -u-nu-latn tags and hourCycle: 'h23' (guest-pass periods read "22 Oct 2026, 08:00–20:00"); older screens still format with 'en' and show "Oct 29, 2026" and "9:00 AM" (D-TYP-16, ID-2.25).

Plurals and lists

  • Every count is an ICU plural, never "job(s)" or a count glued to a word: {count, plural, one {# open job} other {# open jobs}} (canonical §14.3).
  • Arabic has six plural categories in the Unicode rules: zero (0), one (1), two (2), few (3 to 10), many (11 to 99), and other (100, 101, 102, and fractions); above 100 the last two digits decide, so 103 is few again. Write each one the message needs. Global ID's Arabic: {minutes, plural, one {دقيقة واحدة} two {دقيقتين} few {# دقائق} many {# دقيقة} other {# دقيقة}}. A category left out falls back to other.
  • French one covers 0 and 1 ("0 offre", "1 offre"): {minutes, plural, one {# minute} other {# minutes}} (Global ID).
  • Exact values use =0: {count, plural, =0 {No configured booths} one {# configured booth} other {# configured booths}} (Global Games, written with # where its catalog spells the count out).
  • Check the digits. # prints the number in the message's language: test that Arabic messages show Western digits.
  • Lists made at run time use Intl.ListFormat with type: 'conjunction': "الطلاب والموظفين والضيوف", "les étudiants, le personnel et les invités" (the words of Global ID's reviewed landing line). English copy takes the serial comma (D-BCP-17), which en-GB list formatting leaves out ("students, staff and guests"), so English lists use en-US for this one call: "students, staff, and guests". The sources do not settle this case; this keeps both rules.

Phones

  • Store E.164 ("+96171214723"); show the country code and groups, "+961 71 214 723" or "+961 3 123 456", always dir="ltr"; link with tel:+96171214723; the default country is +961, Lebanon (canonical §14.3, D-BCP-19).
  • The field is a fieldset with the legend "Phone number", a "Country code" select defaulting to +961 Lebanon, and a type="tel" input, both dir="ltr". The example goes in the helper text ("For example +961 71 123 456"), never in the placeholder alone (Text field, canonical §10.4).
  • Product note (Global ID): formatMobile groups Lebanese numbers as +961, the 1–2 digit prefix, then 3 and 3 digits, and shows other numbers as stored; normalizeMobile drops the national 0 people type after +961 ("+961 03 123 456" is +9613123456).

IDs and codes

  • Mono (font-mono with a code style), translate="no", dir="ltr", never translated or reformatted, copied without spaces: "GU-25-000123", "7K3M-Q9TD" (canonical §14.3, D-TYP-13).
  • In copy, write "Global ID number"; "GID" is a label on card art only (canonical §1.2).
  • Card validity "MM / YYYY" ("08 / 2030") appears on card art only (canonical §14.3).

Arabic typography

The full rules and values are in Typography; what matters for translation and layout:

  • Same sizes as Latin, taller lines: 1.45 for hero and display; 1.6 for headlines and title-lg; 1.75 for the other titles, body, labels, and the eyebrow; 1.8 for lead; no tracking; no uppercase; the eyebrow at 13px. The block ships as :lang(ar) in oait.css and tailwind.css: never hand-write it and never shrink Arabic (D-TYP-14, D-ARC-29).
  • Text: logical alignment, never justified, no kashida, no italics; punctuation ، ؛ ؟ and « »; other-language parts tagged with lang (canonical §3.7).
  • Fonts: Noto Kufi Arabic through the one family stack, preloaded only on Arabic pages, guarded by the painted-font test (canonical §3.1, §3.2).
  • Room: Arabic headings set 0.83 to 1.44 times the width of English at the same size (median 1.07) and may take one more line; balance them. Taller lines lift text-bearing controls, so they take a minimum height (D-TYP-14, Layout).
  • Month names. ar-u-nu-latn writes أكتوبر; ar-LB writes the Levantine تشرين الأول. Which month names a Lebanese university uses goes to native review with the line heights, Kufi 700 at hero size, and the 13px eyebrow (typography record, open issue 3).

French typography and length

French typography as in France, written into the catalog strings (D-TYP-15, D-BCP-22):

Where Character Example
Before : U+00A0 no-break space Langue : Français
Inside « » U+00A0 « Afficher plus »
Before ; ! ? U+202F narrow no-break space Mot de passe oublié ?
Digit groups, before % written by Intl 1 234 567,5 · 34 %
Apostrophe ’ (U+2019) Bureau de la transformation par l’IA
{ "language": { "current": "Langue\u00a0: {name}" }, "signIn": { "forgotPassword": "Mot de passe oublié\u202f?" } }
  • Accented capitals come from CSS uppercase on sentence-case source, so "Bientôt" renders BIENTÔT in an eyebrow (D-TYP-15).
  • Length. French runs 26.2% longer than English overall and 31.6% longer for short labels (Global ID's catalog). Budget +32% for labels (canonical §3.7) and +26% for running text, and allow up to three times the English length for labels under 10 characters (D-TYP-15, D-BCP-22).
  • Labels wrap, never truncate. Two-line buttons are allowed; an action label is never cut with an ellipsis. Test every screen at 360px in French (canonical §3.7).
  • Guard it with a test over the French catalog that fails on an ordinary space (U+0020) before :, ;, !, ?, or », or after « (D-TYP-15, ID-1.12).
  • Product note (Global ID): the app bar's "Admin console" chip reads "Console d’administration" in French and truncates to "Console d’a…" at 360px today. It is the one chip that may truncate, and it truncates first (canonical §10.15), but the admin console template asks it to fit at 360px in French (canonical §11), so a shorter French label is an open question for native review.

Translation workflow

  • English is the source language. Write the English first, then the Arabic and the French; a language ships only when it is complete (D-BCP-27).
  • One catalog per language, with the same keys: dotted names grouped by screen, such as signIn.password.wrong and me.fields.mobile.saved (Global ID's src/messages/en.json, ar.json, fr.json, read by next-intl). Components hold keys, never text.
  • Whole messages with placeholders. A sentence is one message with {name}, {count}, or {date} inside it, never fragments joined in code, because Arabic and French put the parts in another order: "Showing {from}–{to} of {total}" is "عرض {from}–{to} من {total}" and "Affichage de {from} à {to} sur {total}" (Global ID). Numbers and dates enter already formatted by the helper, or through ICU arguments.
  • One glossary feeds every catalog. Shared actions and fixed component strings come from the glossary in Content and voice, in all three languages (D-BCP-21).
  • Curly apostrophes in English and French: ICU MessageFormat reads the ASCII apostrophe as a quoting character, while ’ never needs escaping (D-BCP-17).
  • Native review before release. Every new Arabic and French string is checked by a native speaker before it ships; Global ID's docs/i18n-review.md is the family's process, and every product's new strings join one review queue (canonical §12.6, D-BCP-22). The register holds one row per message under its language:
Column Holds
Key the message key
Text the Arabic or French exactly as in the catalog
Context where it shows and what it means, for the reviewer ("Snackbar when the language could not be saved.")
Review reviewed and the date, or pending
  • Add every new message as pending; set a row back to pending, with its new text, whenever the message changes. Keep the register out of the code.
  • Product note (Global ID): when the owner lets a release go out before review, the register records it in writing for that release only; the rows stay pending, and nothing later is covered.
  • Tests guard the catalogs. Global ID's src/messages/messages.test.ts runs the first six; the seventh is the French spacing test above, which Global ID adds with ID-1.12:
    1. Arabic and French have every key English has.
    2. They have no key English lacks, so a removed message cannot linger.
    3. No message is empty.
    4. Every catalog names each language in its own language: English, العربية, Français.
    5. The register lists only messages that exist, word for word.
    6. Every email message is in the register, because emails go out under the University's name.
    7. The French catalog has no ordinary space before :, ;, !, ?, or », or after «.
  • Machine translation. translate="no" on product names, IDs, codes, mono addresses, and icon ligatures, so a browser's translation leaves them alone; the rest of the page may be translated. Never ship machine-made Arabic or French: a string that no native speaker has checked stays pending.

Testing languages and RTL

Check How Catches
Every template in three languages screenshots at 320, 390, and 1440px in English, Arabic, and French, light and dark, plus a 360px French pass overflow, truncation, labels that wrap badly (canonical §13)
The turned layout the audit harness's rtl and dark-rtl variants, which set dir="rtl" and lang="ar" on <html> physical properties, unmirrored layout, overflow; not a substitute for real Arabic copy
Names per language the accessibility tree of each language untranslated names, titles, and errors; names that do not start with the visible label
Painted fonts the painted-font e2e test English not in Roboto Flex, Arabic not in Noto Kufi Arabic, a GID not in Roboto Mono, a local() face (Global ID's e2e/design.spec.ts)
Digits and isolation no Eastern digits (٠–٩) on Arabic pages; "+2" stays "+2"; phones and IDs read left to right ar-LB formatters, missing isolates
Icons arrow_forward points left in Arabic; check, play_arrow, and refresh do not turn glyphs outside the registry, a mirror decided per use
Keyboard arrow keys in tabs and radio groups follow the reading direction; Escape closes the switcher reversed or unreversed key handling
The switcher it keeps the path and query, writes oait_locale, and the page comes back with the new lang and dir lost pages, stale attributes
Catalogs the seven tests above missing keys, unreviewed strings, French spacing
Email an Arabic email right aligned, with dir on <html> and <body> mail apps that ignore the logical start
# From the package root: the turned layout in light and dark, at a phone and a desktop width
node tools/audit-page.cjs reference/kitchen-sink.html audit-out --tokens tokens/oait.css --variants light,dark,rtl,dark-rtl --widths 390,1440 --gate
// Playwright: an Arabic visit turns the page and keeps Western digits.
import { expect, test } from '@playwright/test'

test('Arabic turns the page and keeps Western digits', async ({ context, page, baseURL }) => {
  await context.addCookies([{ name: 'oait_locale', value: 'ar', url: baseURL }])
  await page.goto('/')
  await expect(page.locator('html')).toHaveAttribute('lang', 'ar')
  await expect(page.locator('html')).toHaveAttribute('dir', 'rtl')
  expect(await page.locator('body').innerText()).not.toMatch(/[\u0660-\u0669\u06f0-\u06f9]/)
})

Do and don't

Do Don't
/en/jobs and /ar/jobs, with hreflang and x-default English at / and Arabic at /ar (oait.app today)
The account, then oait_locale a cookie of the product's own (gid_locale, gg_locale)
English on the first visit, with the switcher in view a guess from Accept-Language or location
"العربية" with hidden "Switch to Arabic" aria-label="Read this page in Arabic" on a link that shows "العربية" (oait.app)
"Français" in every catalog "French", "Arabe", or "الفرنسية" as the name of a language
ps-4, text-start, border-s pl-4, text-left, border-l
Let dir turn rows round row-reverse under [data-lang=ar] (Tamakkan)
oa-icon--mirror from the registry a mirror flag set use by use, which Global ID's Button never passed
<bdi dir="ltr">+2</bdi> a bare "+2" that shows "2+" (Global Games)
Intl.DateTimeFormat('ar-u-nu-latn', …) ar-LB, or a hand-built "27/10/2026"
"27 October 2026" "October 27, 2026" (Global Jobs, Tamakkan)
"09:00–14:00" "9:00 AM–2:00 PM" (Global Games)
"US$1,200–1,800" "$1,200 – 1,800" (Global Jobs)
"For example +961 71 123 456" in helper text formats in placeholders: "70 123 456", "+961 3 123456", "+961 70 000 000" (Tamakkan)
"Mot de passe oublié ?" with U+202F an ordinary space before "?" (Global ID today)
French labels that wrap at 360px, and a context chip that fits there "Console d’a…" in Global ID's admin bar at 360px
"Global Games" in Latin, isolated, on Arabic pages "غلوبال غيمز" (Global Games' Arabic header)