The Billing System supports multiple languages. By default, it includes English (EN) and Turkish (TR) translations.
Changing the Language
To change the system language, edit Config.Language in config.lua:
Config.Language='en' -- Options: 'en', 'tr'
Adding a New Language
Adding a new language involves two steps: translating the Lua strings (Server/Client) and the React UI strings.
Step 1: Lua Translations
Navigate to the languages/ folder.
Copy en.lua and rename it to your language code (e.g., fr.lua).
Open the file and translate all the values in the table.
Open fxmanifest.lua and add your new file to the files section:
files {'languages/*.lua', -- This already covers all .lua files in the folder -- ...}
Step 2: UI Translations
The UI translations are managed in the web/src/locales/translations.ts file (if you are building from source) or automatically loaded from the Lua files if the bridge supports it.
In this version, the UI automatically fetches translations from the Lua files using the src-billing:client:openTablet message.
To ensure your new language works in the UI:
Ensure your languages/XX.lua file is correctly formatted as a Lua table.
The client/main.lua function getAllLocales() should ideally be updated to include your new language if it's not dynamically scanning:
Translation Contribution
If you translate the system into a new language, please consider sharing it with the community or submitting a Pull Request!
Current Supported Languages:
π¬π§ English (en) - Default
πΉπ· Turkish (tr) - Full support
Tip: You can use HTML tags in some descriptions and reason fields if they are supported by the framework's notification system.
-- In client/main.lua
local function getAllLocales()
return {
en = loadLocaleTable('en'),
tr = loadLocaleTable('tr'),
fr = loadLocaleTable('fr'), -- Add your language here
}
end