react-native-i18n-workflow

React Native i18n Workflow

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "react-native-i18n-workflow" with this command: npx skills add planeinabottle/fitnessmobileapp/planeinabottle-fitnessmobileapp-react-native-i18n-workflow

React Native i18n Workflow

This skill handles the internationalization (i18n) workflow for the Fitness Tracker App, ensuring type-safe translations and consistent language support.

When to Use This Skill

Use this skill when you need to:

  • Add new translatable strings to the app

  • Support a new language

  • Implement interpolation (e.g., "Hello {{name}}!")

  • Use pluralization in translations

  • Handle RTL (Right-to-Left) language detection and layout

  • Ensure type safety for translation keys

Translation Files

Translations are stored in app/i18n/ with one file per language (e.g., en.ts , ja.ts ).

English (Source) Pattern

// 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 en

Using Translations

  1. The translate Helper

Use the standalone translate function for non-component logic:

import { translate } from "@/i18n"

const title = translate("homeScreen:title") const message = translate("homeScreen:deleteAlertMessage", { category: "cat" })

  1. The tx Prop

Many components support a tx prop for automatic translation:

<Text tx="homeScreen:title" preset="heading" /> <Button tx="common:ok" onPress={handlePress} />

  1. The useTranslation Hook

For complex cases or dynamic content:

import { useTranslation } from "react-i18next"

const { t } = useTranslation() return <Text>{t("homeScreen:title")}</Text>

Advanced Patterns

Interpolation

Keys: greeting: "Hello, {{name}}!"

Usage: translate("greeting", { name: "Mirza" })

Pluralization

Keys: pet_one: "{{count}} pet"

pet_other: "{{count}} pets"

Usage: translate("pet", { count: 5 })

Key Path Types

We use TxKeyPath to ensure keys exist at compile time. Format: section:key for top level, section:nested.key for deeper levels.

References

See TRANSLATION_STRUCTURE.md for detailed file patterns.

See I18N_BEST_PRACTICES.md for naming conventions and workflow steps.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

mobx-state-tree-store-builder

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

react-native-storage-manager

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

clinic-visit-prep

帮助患者整理就诊前问题、既往记录、检查清单与时间线,不提供诊断。;use for healthcare, intake, prep workflows;do not use for 给诊断结论, 替代医生意见.

Archived SourceRecently Updated
Automation

changelog-curator

从变更记录、提交摘要或发布说明中整理对外 changelog,并区分用户价值与内部改动。;use for changelog, release-notes, docs workflows;do not use for 捏造未发布功能, 替代正式合规审批.

Archived SourceRecently Updated