Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple language support #57

Open
dhauer opened this issue May 4, 2022 · 8 comments
Open

Multiple language support #57

dhauer opened this issue May 4, 2022 · 8 comments
Labels
base Related to base resource enhancement New feature or request

Comments

@dhauer
Copy link
Contributor

dhauer commented May 4, 2022

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

@TrevorBarns TrevorBarns added enhancement New feature or request base Related to base resource labels May 4, 2022
@TrevorBarns
Copy link
Owner

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

@dhauer
Copy link
Contributor Author

dhauer commented May 4, 2022

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.

@TrevorBarns
Copy link
Owner

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.

@TrevorBarns
Copy link
Owner

d7f2b77
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 :)

@dhauer
Copy link
Contributor Author

dhauer commented May 22, 2022

Overall everything looks wonderful!
I just created a pull request with a new language and a small typo correction for the English translation: #60

@TrevorBarns
Copy link
Owner

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.

@dhauer
Copy link
Contributor Author

dhauer commented May 24, 2022

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.

@TrevorBarns
Copy link
Owner

Fixed 14ea34f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base Related to base resource enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants