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

# FAQ

> Frequently asked questions about LazyLocales

<AccordionGroup>
  <Accordion title="What AI model powers the translations?">
    LazyLocales uses OpenAI's GPT-4o for translations. Each project can configure
    the model and temperature in the dashboard settings.
  </Accordion>

  <Accordion title="Does it translate the entire file every time?">
    No. LazyLocales uses **incremental translation**. When you push a source file update,
    a diff is computed against the previous version. Only new and modified keys are sent
    to the AI. Existing translations are preserved.
  </Accordion>

  <Accordion title="What file format is supported?">
    LazyLocales works with **flat and nested JSON** locale files — the same format used
    by i18next, react-intl, and most i18n libraries. Each key maps to a string value.

    ```json theme={null}
    {
      "greeting": "Hello",
      "auth": {
        "login": "Log in",
        "logout": "Log out"
      }
    }
    ```
  </Accordion>

  <Accordion title="How do I give the AI more context for better translations?">
    Add `__context__` keys to your source JSON. These are sent to the AI as context
    but are excluded from the translated output.

    ```json theme={null}
    {
      "cta.start": "Get started",
      "__context__cta.start": "Call-to-action button on homepage, keep it short"
    }
    ```
  </Accordion>

  <Accordion title="Can I prevent certain keys from being translated?">
    Yes. Use `__lock__` annotations to mark keys that should not be translated (like brand names
    or technical terms). The source value will be copied to all locale files.

    ```json theme={null}
    {
      "brand": "LazyLocales",
      "__lock__brand": true,
      "tagline": "AI-powered translation management"
    }
    ```

    Locked keys are counted separately and don't consume translation credits.
  </Accordion>

  <Accordion title="Can I use LazyLocales in CI/CD?">
    Yes. Generate a **read\_write** API token in your project settings, store it as a
    CI secret named `LAZYLOCALES_API_KEY`, and the CLI will use it automatically.
    See the [CI/CD guide](/integrations/ci-cd) for examples with GitHub Actions, GitLab CI, and Vercel.
  </Accordion>

  <Accordion title="How do I load translations in my app?">
    The CLI writes translated JSON files directly to your project. Import them in your i18next config
    or serve them from your public directory with `i18next-http-backend` for dynamic loading.
    See the [i18next integration guide](/integrations/i18next).
  </Accordion>

  <Accordion title="What are the API rate limits?">
    | Endpoint category           | Limit              |
    | --------------------------- | ------------------ |
    | Locale file fetches (GET)   | 300/min, burst 100 |
    | Translation triggers (POST) | 10/hour            |
    | Source file pushes (PUT)    | 60/min             |
    | General API calls           | 120/min, burst 30  |

    Rate-limited responses return a `429` status with a `Retry-After` header.
  </Accordion>

  <Accordion title="What locale codes are supported?">
    LazyLocales supports all [BCP 47](https://www.rfc-editor.org/info/bcp47) language tags,
    including regional variants. Common examples:

    `en`, `en-US`, `en-GB`, `es`, `fr`, `fr-FR`, `de`, `nl-NL`, `ja`, `ko`, `zh-CN`, `zh-TW`, `ar`, `hi`, `pt-BR`

    The CLI includes a built-in locale picker with 60+ languages.
  </Accordion>

  <Accordion title="Where are my credentials stored?">
    CLI credentials are stored locally in `~/.config/lazylocales/` using the
    [conf](https://github.com/sindresorhus/conf) library. Run `lazylocales logout` to clear them.
  </Accordion>

  <Accordion title="Can I use multiple source files per project?">
    Currently, each project supports a single source locale file. If your app uses multiple
    namespaces, combine them into a nested JSON structure:

    ```json theme={null}
    {
      "common": { "save": "Save", "cancel": "Cancel" },
      "auth": { "login": "Log in", "signup": "Sign up" }
    }
    ```
  </Accordion>
</AccordionGroup>
