Skip to main content
anylang scan generates a runtime file, usually src/anylang.ts, from your source and target locales. Import from that generated file in app code.

Provider

Wrap the application once with AnyLangProvider.

Static JSX text

After the Vite plugin or Next.js wrapper is configured, normal static JSX text is translated automatically.
Use tr="false" for strings that should not be translated.

Dynamic text

Use useTr when the string is dynamic, conditional, or not plain JSX text.

Language state

Use useLanguage to read and update the selected locale.