-
Notifications
You must be signed in to change notification settings - Fork 33
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
Localize this extension to other languages and regions #12
Comments
@ceilican: Are you expecting something like this: A select menu to chose the language |
Not exactly. Ideally, the app should detect the user's language automatically. This should be feasible with use Google's localization features. In particular, I was thinking of this: https://developer.chrome.com/webstore/i18n Another app of mine that has been partially localized is Mind The Word (see also https://github.com/OiWorld/MindTheWord/tree/master/Source/_locales and https://github.com/OiWorld/MindTheWord/blob/master/Description.md). However, even there I haven't been able to localize the texts that appear in the options page. I was only able to localize the texts that appear in the Chrome Web Store. Google's instructions don't say how to use localized messages inside the app itself, and I haven't had time to research how to do that yet. If you could find that out, that would be great. |
I have figured out a solution for this. But I am not being able to test it. I changed my chrome's locale using chrome://setting/languages and the used var language = window.navigator.userLanguage || window.navigator.language; to check my current locale, but it still shows en-US. I am not being able to change the accept language. I even tried with a chrome extension which changes the locale of browser with no luck. Do you know of any reliable way to change and test the locale of the browser? |
No, unfortunately I don't know yet how to detect the user's language. What you described seems to be a bug in Chrome. Maybe it would be worth it to send a bug report to Chrome's developers. |
I will send a bug report to Chrome's developers and wait for their response |
@rohankatyal29 I used navigator.userLanguage , navigator.browserLanguage , navigator.systemLanguage and managed to get the same output en-US . However, when I tried to change my browser default language to some other language, it still outputs en-US. Is it the same thing that you have tried? Also any updates from chrome bug issue? |
@share-with-me: I have tried doing that plus a couple of things more with no success. Don't have any updates about the bug yet |
I have implemented this in my pull request #33 , added support for Hindi language. To add support for other languages would need their respective translations. To add support for your language the procedure that needs to be followed is given below: To Add another language:
To test: (use hi as language-code for Hindi)
|
Issue #12 Localize this extension to other languages and regions
Thank you, @PrateekGupta1509 ! I will keep this issue open, in case other people would like to contribute other languages. |
Adds French Translation, as requested in Issue #12
@ceilican I have added the Portugal Translation, please have a look at it. |
Add translations of the description of this extension here:
https://github.com/OiWorld/CarbonFootprintGoogleMaps/blob/master/Description.md
The text was updated successfully, but these errors were encountered: