Closed Jenselme closed 8 years ago
Hi,
Yes, we have i18n capabilities but you do not need to do anything. We manage 3 languages : french, english and dutch. The system use your browser settings by default and if a language is not implemented UDT use english.
If you want an another language, we need to implement it in i18n service.
In Javascript we use the next code to detect the language :
navigator.language || navigator.userLanguage
Regards, Guillaume
In Javascript we use the next code to detect the language :
navigator.language || navigator.userLanguage
The problem is that it may not detect the language properly. I see here:
if(this.translateTable[this.preferedLanguage] === undefined){
this.preferedLanguage = "en";
}
Which means i18n will only be activated if navigator.language
returns the lang as a two letter code which is not always the case:
navigator.language
returns en-USnavigator.language
returns fr-CHnavigator.language
returns fr (as expected).I think you have to modify this code to take into account the dash that may appear in the local on some systems.
Hello,
Can you test the fix ?
thanks for the report !
Hi,
I see that you have i18n capabilities in https://github.com/institut-de-genomique/Ultimate-DataTable/blob/933dc2198518f94f82392822c7a82b5ebf5d34e4/src/services/udt-i18n.js but I fail to see how I can use it. The documentation is not really helping on that issue.
Can you explain this?