skills/rtl/SKILL.md
Right-to-left locale configuration guide for Better Translate.
npx skillsauth add jralvarenga/better-translate rtlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this guide when some locales should render right-to-left.
RTL is configured in @better-translate/core.
That means you define direction once in the translator, then adapters can read it later.
import { configureTranslations } from "@better-translate/core";
export const translator = await configureTranslations({
availableLocales: ["en", "ar"] as const,
defaultLocale: "en",
fallbackLocale: "en",
directions: {
ar: "rtl",
},
messages: { en, ar },
});
Then read it from the translator or server helpers:
translator.getDirection({ locale: "ar" }); // "rtl"
translator.isRtl({ locale: "ar" }); // true
Keep direction rules in the same shared exported translator so locale inference stays consistent anywhere you consume translator, server helpers, or React hooks.
Keep direction rules in the core config, not scattered across components.
documentation
Repository map for finding Better Translate packages, docs, and examples.
tools
Snapshot of the current public Better Translate package and adapter surface.
development
React and Expo integration guide for Better Translate providers, hooks, and typed translation access.
tools
Next.js App Router setup guide for Better Translate routing, server helpers, and optional React hooks.