Search documentation

Search all pages, headings and text, in the current package or topic or in all documentation.

Direction

Right-to-left languages - who sets the direction, and how the components and formats follow it.

@workspace/active-i18n 1.1.0Developmentunreleased, in development in Foundationbaseline ce081dc3

Language, formats and reading directionClient

الطلب 1042

تاريخ الطلب
21/10/2026، 11:30 ص
المجموع
‏1,234.50 €

Who decides the direction#

The direction of a language is your data: LanguageConfig.direction ('ltr' or 'rtl') carries it with your language set. The package does not set dir anywhere. Your layout does, on <html> for a whole page (or on the region that shows another language), together with active-ui's DirectionProvider, so that components whose keys depend on direction (tabs, sliders, menus) turn around too:

TSX
import {DirectionProvider} from '@workspace/active-ui/components/primitives/direction';
const direction = language.direction ?? 'ltr';
<html lang={language.code} dir={direction}>  <body>    <DirectionProvider direction={direction}>{children}</DirectionProvider>  </body></html>;

What follows the language#

  • Words come from your dictionary for that language.
  • Formats come from the presentation: useFormatters() formats dates, numbers and amounts for the provider's language, with the date order, separators and digits the runtime's CLDR data gives that language.
  • Layout follows dir: logical CSS properties (margin-inline-start, ps-*) turn around; physical ones (left) do not.

A grid and a chart take their direction from their own dir prop or the page, never from the locale, so the same rule holds there.

This page as Markdown