Core API

RTL Support

pico-intl includes built-in utilities for right-to-left language detection and CSS logical property support.

ts
import { getTextDirection } from '@pico-intl-dev/core/rtl';

document.documentElement.dir = getTextDirection(locale);

Key points

  • Use getTextDirection() for document-level dir.
  • Prefer CSS logical properties for spacing and alignment.
  • RTL support is a layout concern as much as a translation concern.

Next step

Copy the example into a small fixture, run the validation commands, and keep framework-specific routing, hydration, or SSR behavior covered by your app tests.