Each of our scripts contains general settings in the Scriptname/configs/cl_config.lua file, located at the beginning of the script under UNIQUE.General.
In this section, you’ll find the entry ['Locale'] = 'en', by default.
In the Locales (found in each script under Scriptname/configs/locales),
you'll find all the translations and text used within the script, which you can customize to your liking.
These include texts for elements such as the UI, notifications, logs, and more.
Depending on the script, some translations may include that start with a %.
These allow you to easily insert dynamic values into the corresponding messages.
How do I change the texts into my language?
To modify existing translations, navigate to your translation file (by default, en.lua) and change all the values after the = sign to your desired language.
Be careful with the punctuation, especially the commas!
How do I create a new translation file?
We provide the en.lua translation file by default, meaning the script uses English as the standard language. To create a new translation file, copy the en.lua file from /configs/locales/ and rename it (for example, to de.lua) to set up your custom translation. Once you've created the new file, open it and translate the texts into your desired language.
At the top of your newly created file, make sure to change Locales['en'] to match the name of your new language file, such as Locales['de']. This ensures that the script will correctly recognize the language you’re using.
To apply the new translation, go to the /configs/cl_config.lua file. Under UNIQUE.General, update the entry ['Locale'] = 'en', to ['Locale'] = 'de', (or the name of your translated file). This will enable the new language in the script.
Tell me more about placeholders.
The placeholders mentioned above are similar to keywords that allow you to display pre-defined values, in a message. These keywords can only be used in specific sections, which we clearly mark for you. A message with a keyword would look like this:
['Message'] = "My name is %PlayerName.",
In this example, the keyword %PlayerName represents the name of the player.
At the beginning of the sections where keywords can be used, we provide a link that takes you to a list of all available keywords and their corresponding values.