not 2 calls if lang en as has been loaded before

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1228023 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-06 08:56:15 +00:00
parent d5461dcc53
commit 515d54e810
1 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ $(function() {
// -- archiva
// load default
loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources", {cache:false, mode: 'map',encoding:'utf-8'});
// load browser locale
var browserLang = $.i18n.browserLang();
loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang, {cache:false, mode: 'map',encoding:'utf-8'});
if (browserLang!='en'){
loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang, {cache:false, mode: 'map',encoding:'utf-8'});
}
});