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

Multi-lingual resources #21

Open
esdeka opened this issue Oct 12, 2015 · 2 comments
Open

Multi-lingual resources #21

esdeka opened this issue Oct 12, 2015 · 2 comments

Comments

@esdeka
Copy link
Contributor

esdeka commented Oct 12, 2015

My line of thought:

Language is detected with GetLocalization, so we don't have to make a selection gui (we'll still add an option to change it in /settings)
Translation resource that has all translation files
Files are for each resource and language separate in xml so people can easily translate them
Resource triggers an event for resources to get their translations
Each resource will need an update function to change the text

@AleksCore
Copy link
Contributor

Today I tried to make this resource but I got problems with xmlNodeGetAttributes. Seems like it returns table for me but this table is empty or what. I would be happy to get some help. :) Draft

@AleksCore
Copy link
Contributor

I think "Files are for each resource and language separate in xml" isn't really needed. Keep translations for all resources in one "english.lua" file even better, because all searches you will do in one file, so it's easy to find a text that you need. Translations in "english.lua" could be separated by comments like this:
--gcshop resource
--race resource

Also, there is ready-for-use resource in mta community. Click

"Each resource will need an update function to change the text" it's also isn't really needed. I have an easy solution and it's pretty good imo: if somebody want to change language in settings, he will be noticed, that he will need to reconnect to change language and there will appear a GUI button to reconnect. You don't change language every day, week, month, and most players will never change the default-detected language, so there is no problems with this and no reason to do unnecessary job :)

Please correct me if I'm wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants