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.

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:

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.

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

Last updated