# Translation

If you want to translate/change names of the categories, stat types, or achievements, you are at the right place.

All categories, stat types and achievements have their own translation in the database to allow creation of data using our [API](https://github.com/rcore-cz/rcore_docs/blob/master/paid-resources/api.md).

If you want to change translation of category, stat type or achievement name, you can do so in the `locales/*.lua` files.

We will be using English as the example in this tutorial.

### Changing Achievement Name or Description

1. Go to `locales/en.lua` file.
2. Find `achievements` table.
3. Find the achievement you want to change.
4. Change the `name` or `description` field to your liking.
   1. This will override the name and description from database allowing you to change it to your liking.

### Changing Stat Type Name

1. Go to `locales/en.lua` file.
2. Find `stat_types` table.
3. Find the stat type you want to change.
4. Change the `name` field to your liking.
   1. This will override the name from database allowing you to change it to your liking.

### Changing Category Name

1. Go to `locales/en.lua` file.
2. Find `categories` table.
3. Find the category you want to change.
4. Change the `name` field to your liking.
   1. This will override the name from database allowing you to change it to your liking.

## Adding a translation for new category, stat type or achievement

1. Go to `locales/en.lua` file.
2. Add a new entry to the table you want to add translation to. (categories, stat\_types, or achievements)

### Category and Stat Type

As for categories and stat types, you can just add a simple key-value translation like this:

```lua
categories = {
    ... -- Other categories
    new_category = 'New Category',
},

stat_types = {
    ... -- Other stat types
    new_stat_type = 'New Stat Type',
},
```

### Achievement

Achievements are a bit more complex as they have a name and description.

```lua
achievements = {
    ... -- Other achievements
    new_achievement = {
        name = 'New Achievement',
        description = 'Description of the new achievement',
    },
},
```


---

# 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://documentation.rcore.cz/paid-resources/rcore_stats/translation.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.
