Open dhauer opened 2 years ago
Great idea! I have started implementing a locale system from QBCore. Once finished I will push a commit, feel free to PR additional locale / languages to support as I will likely only be providing a base english option.
Beware though, LVC has many many (dare I say many again) strings..
Perfect! Then I'll wait for your commit and extend that with another language (in that case that would be German).
But I have one more question. Do you implement all the used parts of QBCore in this script or will there be a dependency to QBCore? Because for me as an ESX user the latter would not be really good. Then I would have to implement a workaround.
"Beware though, LVC has many many (dare I say many again) strings.." I already noticed this painfully when installing it on the server. I have to maintain this also currently with every update.
Because QBCore is a GNU licensed open-source project, I am "borrowing" (with due copyright given) the small piece of code that manages locales. It will be included with the standard download and will not require any dependancies or have any conflicts with other frameworks.
https://github.com/TrevorBarns/luxart-vehicle-control/commit/d7f2b77c943166bd42df9d35f39c50c0ee8cdda1
Added locale support:
\UI\locale\en.lua
contains translations, %{variable} indicates the script is replacing that portion with info, do not remove these, however they can be moved.
The language is set in fxmanifest.luam
There are a ton of strings, feedback is welcome :)
Overall everything looks wonderful! I just created a pull request with a new language and a small typo correction for the English translation: https://github.com/TrevorBarns/luxart-vehicle-control/pull/60
Just realized I added all the plugins to support translation, but when committing I must have override my progress, so plugins are still messed up.
Another thing: You wrote that I can select the language in the fxmanifest.lua file (probably by implementing the file), but there is nothing related to translations.
Hello all!
Is there any interest here to support multiple languages? I have to manually convert translations every time I update. I could very well imagine working here, as in many other scripts, with an extra 'locales' folder and existing locale files for each supported language.
If such support is desired, then I would be willing to implement this conversion and create a pull request for later review.
Best regards Dustin