[fix] Force use of 2 char langcode. Prevent double load of english json file.

This commit is contained in:
opi 2014-06-09 19:09:45 +02:00
parent bba105c228
commit dde8755128

View file

@ -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