Loading...
Loading...
Manages internationalization strings and translation workflows using i18next and react-i18next. Use when adding new text, supporting additional languages, or implementing pluralization and interpolation in Fitness Tracker App.
npx skill4agent add planeinabottle/fitnessmobileapp react-native-i18n-workflowapp/i18n/en.tsja.ts// app/i18n/en.ts
const en = {
common: {
ok: "OK!",
cancel: "Cancel",
},
homeScreen: {
title: "My Collection",
deleteAlertMessage: "Delete this {{category}} workout?",
}
}
export default en
export type Translations = typeof entranslatetranslateimport { translate } from "@/i18n"
const title = translate("homeScreen:title")
const message = translate("homeScreen:deleteAlertMessage", { category: "cat" })txtx<Text tx="homeScreen:title" preset="heading" />
<Button tx="common:ok" onPress={handlePress} />useTranslationimport { useTranslation } from "react-i18next"
const { t } = useTranslation()
return <Text>{t("homeScreen:title")}</Text>greeting: "Hello, {{name}}!"translate("greeting", { name: "Mirza" })pet_one: "{{count}} pet"pet_other: "{{count}} pets"translate("pet", { count: 5 })TxKeyPathsection:keysection:nested.key