vMenu icon indicating copy to clipboard operation
vMenu copied to clipboard

Multi language support

Open QuadrupleTurbo opened this issue 3 years ago • 5 comments

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 in permissions.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": "главное меню",
}

QuadrupleTurbo avatar Oct 07 '22 13:10 QuadrupleTurbo

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!

TomGrobbe avatar Nov 12 '22 22:11 TomGrobbe

Could you resolve the merge conflicts please so I can go over the review again

TomGrobbe avatar Mar 04 '23 17:03 TomGrobbe

Oh my bad, in 10 mins.

QuadrupleTurbo avatar Mar 04 '23 17:03 QuadrupleTurbo

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.

TomGrobbe avatar Mar 04 '23 17:03 TomGrobbe

Hello I wish to pay whoever can help me implement this into my server

skyxkiing avatar Aug 28 '23 18:08 skyxkiing