一键导入
expo
Expo and React Native integration guide using Better Translate React support.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Expo and React Native integration guide using Better Translate React support.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Extract source strings, generate locale files, and remove unused keys for Better Translate projects.
React and Expo integration guide for Better Translate providers, hooks, and typed translation access.
Package map and reading order for Better Translate product skills.
Guide for combining Better Translate packages without duplicating translation ownership.
Smallest Better Translate setup for plain TypeScript, Node.js, Bun, APIs, and shared libraries.
Map of Better Translate example apps to copy from when starting a new integration.
| name | expo |
| description | Expo and React Native integration guide using Better Translate React support. |
Use this guide when the app is Expo or React Native.
@better-translate/core@better-translate/reactThere is no separate native adapter package.
@better-translate/coreBetterTranslateProvideruseTranslations() inside screens and componentsThe simplest no-extra-generic setup is to bind the translator once and export an app-local provider + hook pair.
createBetterTranslateReact(translator)import { createBetterTranslateReact } from "@better-translate/react";
import { translator } from "./i18n";
export const { BetterTranslateProvider, useTranslations } =
createBetterTranslateReact(translator);
Then screens can import your app-local hook:
import { useTranslations } from "./i18n";
export function HomeScreen() {
const { t } = useTranslations();
return <Text>{t("home.title")}</Text>;
}
These fallback patterns still work in Expo too.
import { useTranslations } from "@better-translate/react";
import { translator } from "./i18n";
export function HomeScreen() {
const { t } = useTranslations<typeof translator>();
return <Text>{t("home.title")}</Text>;
}
useTranslations()Create src/better-translate.d.ts:
import { translator } from "./i18n";
declare module "@better-translate/react" {
interface BetterTranslateReactTypes {
translator: typeof translator;
}
}
Then components can call useTranslations() directly and keep key autocomplete.
Do not look for @better-translate/react-native.
Expo support lives inside @better-translate/react.
Only add more packages if the app actually needs them:
@better-translate/md for localized content files@better-translate/cli for generated locale files