πSetting Up Locales
Step 1: Set Default Languages
To set the default language for your server, you need to add the following line to your server.cfg
file:
setr ox:locale en
This line ensures that the default language used by the server is English (en
). You can replace en
with any other supported locale code (such as it
for Italian, fr
for French, etc.) to change the default language to your preference.
You can find the correct language codes to use by visiting ISO Language Code.
Step 2: Allowing Players to Choose Their Own Language
In addition to setting a default language for your server, you can also allow players to customize their language preference. To enable this feature, add the following line to your server.cfg
:
setr ox:userLocales 1
When this option is enabled (1
), players will be able to choose their preferred language individually, overriding the default language set by the server. This provides a more personalized experience for players who prefer a different language than the default.
The language selection menu can be accessed using the command: ox_lib
, offering an easy and intuitive way for players to modify their settings.
Make sure to restart your server after making this change for it to take effect.
Last updated
Was this helpful?