React localization

React is Meta’s Open Source JavaScript library for building user interfaces through reusable components. It doesn’t have internationalization built in, so React i18n runs on libraries like react-i18next, react-intl (FormatJS), and i18next, all of which store translations in JSON files, or LinguiJS which works with PO files. Localazy translates both types of files and syncs them back into your project, whichever library powers your app.

How Localazy works with React

Upload your source JSON or PO through the Localazy CLI, translate on the platform, and download completed files back into your locales folder, with no framework modifications or extra dependencies.

  • Flat and nested JSON - key-value files and deep hierarchies parsed automatically, dot notation preserved.
  • Namespace-friendly - component-based or feature-based file structures respected on upload and download.
  • Interpolation protection - react-i18next’s {{variable}} and react-intl’s {variable} syntax guarded during translation.
  • ICU plural validation - plural and select rules checked so they stay syntactically correct in every target language.
  • CI/CD automation - localazy upload and localazy download fit into GitHub Actions or any pipeline.

Helpful Localazy features for React translation

Placeholder validation

A translator or machine translation engine that mangles {{count}} produces a string that renders literally, or crashes the formatter. Localazy detects and protects placeholders.

Format conversions & Translation memory

Migrating from one i18n library to another? Convert your strings between JSON and PO. Sharing strings with a React Native app or a backend? Download the same translations in any of 40+ formats from a single project or resue translations across projects with Translation Memory.

React + Localazy: Quick start guide

Learn how to use React with Localazy. Set up your localization workflow in minutes!

Read the guide

AI-driven translation
with human control

Bring your whole team inCollaborate with your colleagues, clients, or users without seat limits.
Establish a source of truth for your contextManage terminology, instructions, and style guides all in one place.
Let Localazy AI handle the first draftAutomatically generate new translations based on your context.
Get human reviewers to keep an eye on qualityHave our trusted native speakers review your translations as you go.
Localazy CLI: Automated localization for your project

Localazy CLI: Automated localization for your project

Designed for development teams, Localazy CLI provides advanced i18n automation capabilities to manage translations across your entire pipeline. Integrate  your project with Localazy CLI & align it to your current CI/CD workflows.

Try Localazy with a 14-day trial!

Sign up now and start translating!

Start now

Frequently Asked Questions

To download translations to their original locations, you can follow these steps. First, in the localazy.json configuration file and go to the download section. In this section, configure where you want to download your translations.

For a smoother process, ensure that you include the “path” parameter during the upload and use the same variable in the download section. Here’s an example of how to do it:

"upload": {
  "files": [
    {
      "pattern": "src/**/locale/en.ts",
      "lang": "inherited",
      "path": "${path}"
    }
  ]
},

"download": {
  "files": [
    {
      "output": "${path}/${lang}.ts"
    }
  ]
}

By setting the “path” parameter correctly, the translations will be downloaded to the respective locations specified in your localazy.json configuration file.

Last updated: 03/12/2025

Your projects can often contain multiple keys with the same content. Be it button labels across a large-scale information system, including keys on the backend and frontend or Android vs. iOS versions of your app. There are two ways to approach duplicate keys with Localazy.

The first option to consider when you have two or more projects that contain duplicities is to use the Connected Projects feature, which is available with the Professional plan. Connected Projects can help you by translating identical keys across multiple projects. This feature is great for a portfolio of projects sharing duplicate keys or Android and iOS versions of the same app. When enabled, Localazy distributes existing translations between connected projects and automatically decides whether the translation can be used right away or needs to go through review first.

For a robust duplicity management that can work with duplicities inside one project and across multiple projects as well, we recommend the Duplicity Linking feature, available with the Business plan. With duplicity linking, you can define one key as the source for all other keys with the same or similar content. The other keys are then marked as hidden and get their translation from the linked key.

Last updated: 26/02/2025

You can upload existing translations to your source files in Localazy File Management or follow the guide to uploading existing translations via the CLI.

In file management, you won’t see multiple versions of the same files in various languages.

You can imagine each Localazy file as a stack of its localized versions - with the source language on the bottom and all of the translated versions on top of it. So when you want to add a new language file, you update the stack.

If you want to upload translations in another language to Localazy, use the Upload existing translations option.

Last updated: 26/02/2025

Yes, absolutely. You can have multiple files in different folders uploaded to the same project.

You can include files by their exact path or by using standard path wildcards ? (single character), * (anything except path separator), ** (anything including path separators).

You can control files you want to upload with exclusion rules and conditions.

Example:

"upload": {
    "type": "json",
    "files": "modules/**/en.json"
  }
 
}

The above configuration will scan for files named en.json in all subfolders of the modules folder.

Last updated: 30/10/2025

The configuration process centers around the localazy.json file in your project root.

An example configuration includes:

{
    "writeKey": "your-write-key",
    "readKey": "your-read-key",
    "upload": {
        "type": "json",
        "files": {
            "pattern": "src/**/locales/*.json",
            "path": "${path}",
            "file": "${file}"
        }
    },
    "download": {
        "files": "src/locales/${lang}/${file}"
    }
}

The configuration supports variables, conditions, transformations, and format-specific features. You can also include group definitions for organizing different sets of files and rules for handling special cases.

Last updated: 26/02/2025

There are two main approaches to structuring translations in a front-end project:

Centralized Approach

All translations are stored in one location:

my-app/
└── src/
    └── assets/
        └── locale/
            ├── en.json
            └── es.json

Pros:

  • Simple to set up
  • Easy to find all translations in one place

Cons:

  • Can become unwieldy in larger applications
  • All translations load at once (potentially impacting performance)

Component-Based Approach

Translations are distributed alongside their components:

my-app/
└── src/
    └── modules/
        ├── feature-a/
        │   └── locale/
        │       ├── en.json
        │       └── es.json
        └── feature-b/
            └── locale/
                ├── en.json
                └── es.json

Pros:

  • Better organization in large applications
  • Works well with lazy loading
  • Teams can own their translations

Cons:

  • More complex setup
  • Requires additional configuration

For most applications, especially as they grow, the component-based approach offers better maintainability and scalability. However, for smaller applications, the centralized approach might be simpler to start with.

Localazy shows you the path to the original file, so you know what module you are translating.

Choose based on your project size and team structure, with the understanding that you can migrate between approaches as your needs evolve.

Last updated: 26/02/2025
Try the React integration with your own content!

Automate your localization with Localazy today!

Sign up now