-
Notifications
You must be signed in to change notification settings - Fork 134
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
feat: i18n #56
base: master
Are you sure you want to change the base?
feat: i18n #56
Conversation
This only translates messages that come from the Javascript, right? Or am I missing something and does it also translate the parts of the UI that are in HTML? |
The translation is supported on both sides. Only some error messages are not supported, because there are directly given by the server. Enregistrement.de.l.ecran.2021-03-07.a.13.04.26.mov |
How Translation.prototype.selectLanguage = function (language) works? |
I didn't use any header as Translation.prototype.selectLanguage = function (language){
this.language = this.languages.filter(l => l === language).length === 1 ? language : this.default;
} This method will initialize the field The method |
I meant, does it read all the languages a user has chosen or only the first one? |
The patch uses the For now, the important things to decide are:
I have little experience with translation (I'm usually into software in English but with full support for non-ASCII scripts), so I'd welcome advice on both points above. |
@Mejans seems to have some experience with i18n modules. |
I usually translate and some times I write code :) |
dd6d4c6
to
b660bc4
Compare
@jech Any news related to this PR? |
I'm coming to check if there is news about this feature. |
Sorry. I'm currently aiming at getting a stable 0.3.3 out, with no new features, just fixes. I'll think about this after 0.3.3 is out. |
5c390a8
to
b1bb427
Compare
ace55c3
to
32663db
Compare
6eeac02
to
de78f3c
Compare
4f84b48
to
0d2ca28
Compare
I've just made this PR #103 :) |
65fa0be
to
03038ea
Compare
b7172df
to
8de77fe
Compare
Hi,
I set up an i18n module.
There are no external dependencies.
I loaded 2 available languages (en & fr).
Principipaly this is based on (key, value) JSON file.
I inspire myself from the jQuery attribute data-i18n.
In the HTML file:
In the JavaScript files:
Fix: #33