habra.
  • Introduction
  • Extensions
  • Contributing
  • 🚀Self-host
    • Cloning and installation
    • Running
  • 📂structure
    • How it renders
    • Styles
    • Redux store
    • Routing
    • Locales
Powered by GitBook
On this page
  • 1. Find a string to translate
  • 2. Add useTranslation hook to the component
  • 3. Add a key to the locale file
  • 4. Replace string with translation

Was this helpful?

  1. structure

Locales

PreviousRouting

Last updated 3 years ago

Was this helpful?

Locales are located here: src/locales/[code]

To add a new translation file, create a new folder in locales and name it as a language code (ex. 'ru' or 'en'). We use for localization, so explore their docs first if you want to contribute.

To translate a page, do the following:

1. Find a string to translate

2. Add useTranslation hook to the component

3. Add a key to the locale file

Here we follow the files path: pages/Search -> noResultsText . Add new keys to theirs components! If a key is being used a lot in the project, add it to common section.

4. Replace string with translation

📂
react-i18next