RTL Layout
Full right-to-left support using CSS logical properties. Switch to Arabic or Hebrew — the entire layout mirrors without a single margin-left in the codebase.
A live Next.js demonstration of RTL layout, locale-aware routing, and Intl formatting — the i18n skills enterprise teams actually need.
Full right-to-left support using CSS logical properties. Switch to Arabic or Hebrew — the entire layout mirrors without a single margin-left in the codebase.
Dates, numbers, and currency formatted correctly for each locale via the native Intl API. No third-party library. No manual formatting.
Locale-aware URLs powered by next-intl middleware. Accept-Language detection automatically redirects users to their preferred locale.
The same values, formatted correctly for all four locales simultaneously.
| Locale | Date | Number | Currency | Direction |
|---|---|---|---|---|
enEnglish | January 15, 2024 | 1,234,567.89 | $9,999.99 | Left-to-right |
frFrançais | 15 janvier 2024 | 1 234 567,89 | 9 999,99 € | Left-to-right |
arالعربية | 15 يناير 2024 | 1,234,567.89 | 9,999.99 ر.س. | Right-to-left |
heעברית | 15 בינואר 2024 | 1,234,567.89 | 9,999.99 ₪ | Right-to-left |
Switch to Arabic or Hebrew above — the entire page mirrors. No duplicated CSS. No JavaScript overrides. Just this:
.card {
padding-inline: 1.5rem; /* ≠ padding-left/right */
margin-block-end: 1rem; /* ≠ margin-bottom */
border-inline-start: 2px solid var(--color-accent); /* ≠ border-left */
text-align: start; /* ≠ text-align: left */
inset-inline-start: 0; /* ≠ left: 0 */
}
/* No margin-left. No margin-right.
Direction is handled by the browser. */This card uses only CSS logical properties. Change the direction above to watch it mirror.
English (LTR)
Arabic (RTL)
The entire page uses these properties — every margin, padding, and border. Switch locales in the nav to see it live.