locales.js 230 B

12345678
  1. import { locales, defaultLocale } from "../data/locales"
  2. export const getDirForLocale = (localeCode) => {
  3. localeCode ??= defaultLocale
  4. const locale = locales.find((l) => l.code === localeCode)
  5. return locale?.dir || "ltr"
  6. }