> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobile-starter.amisi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Translations

> Manage keysets, locale resources, and runtime i18n setup

# @amisi/i18n

`@amisi/i18n` centralizes translation keysets, English locale resources, and runtime translation setup.

## What keysets are for

A keyset is a typed map of approved translation keys for one domain.

* prevent typos in translation lookups
* make keys discoverable by domain
* keep app code aligned with locale files

## Example

```ts theme={null}
import { authKeys, t } from '@amisi/i18n';

const title = t(authKeys.signInTitle);
```

## Runtime setup

Wrap your app once with `I18nProvider`:

```tsx theme={null}
import { I18nProvider } from '@amisi/i18n';

export const AppRoot = () => {
  return (
    <I18nProvider>
      <App />
    </I18nProvider>
  );
};
```

## Using translations in components

```tsx theme={null}
import { useAppTranslation, authKeys } from '@amisi/i18n';

export const SignInHeader = () => {
  const { t } = useAppTranslation();

  return <Text>{t(authKeys.signInTitle)}</Text>;
};
```

## Locale source of truth

All default English text lives in:

* `packages/i18n/src/locales/en/*.json`

Keep this folder updated first, then add or sync other locales.
