> For the complete documentation index, see [llms.txt](https://jarvis394.gitbook.io/habra/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jarvis394.gitbook.io/habra/structure/locales.md).

# Locales

Locales are located here: `src/locales/[code]`&#x20;

![](/files/-Mhxg9iFpnEDjvwa4EDu)

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 [react-i18next](https://react.i18next.com/) 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

<div align="left"><img src="/files/-Mhxh2ZdSq_yYi2TXa42" alt=""></div>

### 2. Add `useTranslation` hook to the component

<div align="left"><img src="/files/-Mhxhf-ldCJF0UMJbtjW" alt=""></div>

### 3. Add a key to the locale file

<div align="left"><img src="/files/-MhxhpkpHaDTKhrWFYOc" alt=""></div>

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

<div align="left"><img src="/files/-MhxiV6MsHN_EbAQHreo" alt=""></div>
