Multi language support
Added
- Multiple language support.
- Client can save their preferred language using the misc options save settings feature, the language will apply on join.
- Language template dumper command
vmenuclient dumplang(set to be only for admins inpermissions.cfg).
Usage
Setting a default language
In your fxmanifest.lua, set the default language for the client by setting default_language to your preferred language from the config/languages folder. Here's an example:
-- The default language of the menu
default_language "English"
Adding new languages
To add languages, dump the default language by executing the command vmenuclient dumplang client side, locate the template in your config/languages folder which will be named TEMPLATE.json, rename TEMPLATE.json to whatever language you want, then in your fxmanifest.lua edit the languages convar for example:
-- Add the names of the jsons added to config/languages here in the current format
languages 'English, French, Polish, German'
Editing the language config
Format
{
"Original Text": "Translated Text"
}
Example
{
"Main Menu": "главное меню",
}
I'll take some time soon to go through this and all other PR's. I've been very busy recently, but I will be looking into it I promise!
Could you resolve the merge conflicts please so I can go over the review again
Oh my bad, in 10 mins.
No rush, it'll probably take a bit of time for me to review this properly. There have also been some changes and other PR's that were merged earlier today so those will need to have the translations added as well.
Hello I wish to pay whoever can help me implement this into my server