# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jarvis394.gitbook.io/habra/structure/locales.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
