skills/core/SKILL.md
Smallest Better Translate setup for plain TypeScript, Node.js, Bun, APIs, and shared libraries.
npx skillsauth add jralvarenga/better-translate coreInstall 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 you want the smallest possible Better Translate setup.
@better-translate/core is the base translation engine.
Use it when:
Create one translator file and export it:
import { configureTranslations } from "@better-translate/core";
const en = {
home: {
title: "Hello",
},
} as const;
const es = {
home: {
title: "Hola",
},
} as const;
export const translator = await configureTranslations({
availableLocales: ["en", "es"] as const,
defaultLocale: "en",
fallbackLocale: "en",
messages: { en, es },
});
TypeScript key autocomplete depends on the shared exported translator.
as consttranslatortranslator.t(...) from code that needs typed keysimport { translator } from "./i18n";
translator.t("home.title");
translator.t("home.title", { locale: "es" });
That keeps locale values and translation keys inferred from the messages you configured.
@better-translate/react when React components need hooks or locale switching@better-translate/nextjs when Next.js routes or server helpers need locale awareness@better-translate/astro when Astro requests need locale awareness@better-translate/md when content files should follow the same locale setupUse { bt: true } in any t() call to write source text directly instead of inventing a key:
t("Hello world", { bt: true });
Then run npx bt extract to generate keys automatically and rewrite the calls. See skills/cli/SKILL.md for the full setup.
Do not create one translation system per framework.
Create one core translator first, then let adapters read from it.
documentation
Repository map for finding Better Translate packages, docs, and examples.
tools
Snapshot of the current public Better Translate package and adapter surface.
documentation
Right-to-left locale configuration guide for Better Translate.
development
React and Expo integration guide for Better Translate providers, hooks, and typed translation access.