vMenu icon indicating copy to clipboard operation
vMenu copied to clipboard

Multiple languages & Language adaptation

Open kasuganosoras opened this issue 4 years ago • 8 comments

Added new feature

  • Multiple languages support
  • Language adaptation (Auto detect client language)
  • Language texts dump

Added Languages

  • English (Default)
  • Simplified Chinese
  • Traditional Chinese

Added Command

  • /vmenuclient dumplang (Dump all language texts to server and save to dumped_text.json, request permission vMenu.DumpLanguages.Dump)

Added Class

  • vMenuClient/LanguageManager.cs

Added Files

  • vMenuServer/languages.json

Locale file format

{
    "Language Name": {
        "Original Text": "Translated Text"
    }
}

Example:

{
    "chinesetraditional": {
        "Toggle NoClip on or off.": "開啟或關閉無碰撞飛行"
    }
}

Locale use in code example

LanguageManager LM = new LanguageManager();
Notify.Success(LM.Get("Original text here"));

Thank you for creating this awesome menu!

kasuganosoras avatar May 28 '20 11:05 kasuganosoras

It's almost as if you read my mind, I was about to add this myself. I'll review all the changes (already spotted a few things I'd like changed) in a bit.

TomGrobbe avatar May 28 '20 17:05 TomGrobbe

Additionally, please make an option to allow other languages than just the game languages to be added. So the user can select a language they want regardless of game language. Make this option default to the game's language.

TomGrobbe avatar May 28 '20 17:05 TomGrobbe

Thank you so much! 😆 Umm...In actually I am not good at C#, so I use the Google to learn how to write the code xD

kasuganosoras avatar May 28 '20 18:05 kasuganosoras

@kasuganosoras For just googling bits this isn’t half bad lol

TomGrobbe avatar May 28 '20 20:05 TomGrobbe

I don't know how to pull a request but if anyone can . To add Blackout mode as always off or always on/config. Every other script with that config vmenu wont allow to turn the lights off. I have to do it everytime manually. It kinda sucks.

Also another pull request the saved vehicles they could be used as a real garage if when you save the vehicle it despawns whitch it doesnt and when you spawn the vehicle it deletes from the garage. Which it doesn't . This would be a game changer for someone running servers that does not require jobs. Literally every garage has dependencys. Thanks and sorry to post here. But i dont understand how to pull a request.

outsider310 avatar May 29 '20 15:05 outsider310

@TomGrobbe

If this is to be implemented here, I would translate from English to German...

Justman10000 avatar May 25 '21 17:05 Justman10000

Any news about this? Has this been implemented in the new version yet?

CipherGuardianSweden avatar Jan 08 '22 20:01 CipherGuardianSweden

Well, that deescalated. Still needed.

MJRamon avatar Feb 02 '22 10:02 MJRamon

Currently none of the requested changes have been made yet. There is another PR that also implements multiple languages. Whichever one gets updated first and has the best implementation will be used, the other will unfortunately be closed.

TomGrobbe avatar Mar 04 '23 17:03 TomGrobbe