Hi,
I'm using the developers edition 2.3.
Is there a way to force the app to be in a specific locale setting instead of defining the locale setting by the browser?
I know that I can do that using URL parameters, but I'm looking for a way to insert the parameter inside the code without changing the URL .
Thanks,
Dikla.
Solved! Go to Solution.
Dilka,
I the init.js find the setLocale function and make this change (line 26):
function setLocale(){
if(window.queryObject.locale){
dojoConfig.locale = window.queryObject.locale.toLowerCase();
window._setRTL(dojoConfig.locale);
return;
}
if(allCookies.esri_auth){
/*jshint -W061 */
var userObj = eval('(' + unescape(allCookies.esri_auth) + ')');
if(userObj.culture){
dojoConfig.locale = userObj.culture;
}
}
if(window.queryObject.mode){
if(allCookies.wab_locale){
dojoConfig.locale = allCookies.wab_locale;
}
}else{
if(allCookies.wab_app_locale){
dojoConfig.locale = allCookies.wab_app_locale;
}
}
dojoConfig.locale = "he";
if(!dojoConfig.locale){
dojoConfig.locale = navigator.language ? navigator.language : navigator.userLanguage;
}
dojoConfig.locale = dojoConfig.locale.toLowerCase();
window._setRTL(dojoConfig.locale);
}
Dilka,
I the init.js find the setLocale function and make this change (line 26):
function setLocale(){
if(window.queryObject.locale){
dojoConfig.locale = window.queryObject.locale.toLowerCase();
window._setRTL(dojoConfig.locale);
return;
}
if(allCookies.esri_auth){
/*jshint -W061 */
var userObj = eval('(' + unescape(allCookies.esri_auth) + ')');
if(userObj.culture){
dojoConfig.locale = userObj.culture;
}
}
if(window.queryObject.mode){
if(allCookies.wab_locale){
dojoConfig.locale = allCookies.wab_locale;
}
}else{
if(allCookies.wab_app_locale){
dojoConfig.locale = allCookies.wab_app_locale;
}
}
dojoConfig.locale = "he";
if(!dojoConfig.locale){
dojoConfig.locale = navigator.language ? navigator.language : navigator.userLanguage;
}
dojoConfig.locale = dojoConfig.locale.toLowerCase();
window._setRTL(dojoConfig.locale);
}
thank you so much Robert!!!
Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.