mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Force use of 2 char langcode. Prevent double load of english json file.
This commit is contained in:
parent
bba105c228
commit
dde8755128
1 changed files with 6 additions and 4 deletions
|
@ -1208,11 +1208,13 @@ $(document).ready(function () {
|
|||
|
||||
// User language
|
||||
if (window.navigator && window.navigator.language) {
|
||||
y18n.locale = window.navigator.language;
|
||||
y18n.locale = window.navigator.language.substr(0, 2);
|
||||
if (y18n.locale !== 'en') {
|
||||
$.getJSON('locales/'+ y18n.locale +'.json', function(data){
|
||||
y18n.translations[y18n.locale] = data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Application
|
||||
|
|
Loading…
Reference in a new issue