🌍Translations

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

  1. Navigate to the languages/ folder.

  2. Copy en.lua and rename it to your language code (e.g., fr.lua).

  3. Open the file and translate all the values in the table.

  4. 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:

  1. Ensure your languages/XX.lua file is correctly formatted as a Lua table.

  2. 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


circle-check

Last updated