Skip to content

Translation

Daniel Perales Mauriz edited this page Jun 10, 2022 · 36 revisions

The bot has been designed to work in multiple languages, displaying the dialogs (both console and user interactions) in one of the languages available in the directory /resources/locales and configured in the file /configs/main.json.

Supported languages

To set the bot's language to something other than English (by default), you must modify the language key in the configuration file main.json and place in that field any of the ISO 639-1 codes from the list shown below:

Language Code Author Coverage
English en-US EasyXploit 100%
Spanish es-ES EasyXploit 100%
Italian it GBruteforce Working
Romanian ro PichilBerpich Working

Additional languages

You can create your own translations into the languages you want by creating a copy of one of the language files contained in the directory /resources/locales, changing its name to another (following the ISO 639-1 codes supported by Discord), respecting the .json extension of the file, saving it in the same directory as the rest of the languages and modifying ONLY the values of the keys according to the JSON specification.

For example, a translation from English to Spanish would look like this:

  • Original in English:
    "configError": "Error loading command"

  • Translated to Spanish:
    "configError": "Error al cargar el comando"

It is recommended to keep all punctuation marks (., , ...), special characters ([, {, :, ...), current case sensitivity, spacing, Markdown formatting (**, ``, __, ...), line breaks (\n) and escaped characters (\").

Once you have everything translated, you must configure the language key of the file /configs/main.json with the name of the language file you created (without the .json extension), and after restarting the bot, it will start using the new language.

Wildcards

The content of some parts of the dialogs can vary depending on the situation, so for those parts that change (such as usernames, dates or mentions) the bot makes use of wildcards, which are reserved words that they are enclosed in double brackets {{}}, so that if, for example, a field contains the string {{memberTag}}, once the program is executed, this string will be changed to the tag of the member in question, being of the form someMember#1234.

NOTICE:
Wildcards need to be present and not removed, otherwise the bot might stop working properly. You will have to keep it in your translations and place them where they are most appropriate in the context of the sentences.

Clone this wiki locally