From the reference libraryRedM

i18n

jo_libs/modules/i18n/index.md

i18n

i18n is a module to implement an internationalization system for your resource.

Include i18n in your script

  1. To use the i18n library, just add the initiator as a shared script inside of your fxmanifest.lua file.
shared_scripts {
  '@jo_libs/init.lua'
}

  1. Add the i18n module inside the fxmanifest.lua (in lowercase)
jo_libs {
  'i18n',
}
  1. Set the default locale in your server.cfg file:
setr jo_libs:i18n:locale "en"

You can now use the library inside of your resource with the jo.i18n global variable.

Functions

Documentation for the Both Sides side.

Back to documentation