Real Wallet / Guides

Languages

Every text players read (notifications, the tag, the key binding names) is in locales/. Real Wallet comes in 14 languages, with the same codes as ox_lib:

Code Language Code Language
en English it Italian
ar Arabic nl Dutch
cs Czech pl Polish
da Danish pt-BR Portuguese (Brazil)
de German ru Russian
es-ES Spanish sv Swedish
fr French tr Turkish

Picking the language

Lua
Config.Locale = 'en'
  • A code from the table, e.g. 'de'.
  • 'auto': the language you set for ox_lib in server.cfg (setr ox:locale de).
  • Case does not matter, and a language alone finds its file: 'pt' uses pt-BR, 'es' uses es-ES.
  • A code with no file prints Config.Locale xx: no such file in locales/ - English is used and uses English.
  • Any text a language file does not have shows in English.

Changing a text

Open the language's file in locales/ and change the text after the =. Keep every %s and %d: they are filled in with a name, a card or an amount.

Lua
cash_counted = 'You count $%s in cash.',

Adding a language

  1. Copy locales/en.lua to locales/<code>.lua, for example locales/fi.lua.
  2. Change Locales.en at the top to Locales.fi (for a code with a dash, use Locales['pt-PT']).
  3. Translate the texts.
  4. Set Config.Locale = 'fi' and restart.

Files in locales/ are loaded automatically (locales/*.lua in fxmanifest.lua).

Card designs and card names are not in locales/: the words on the cards are in Config.CardText, and each card's name is its label in Config.Cards.

Still stuck? Open a ticket in the Ryan Studios Discord and we'll help you out.