Made auto-language-picker only use full translations

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1083 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2009-12-22 21:24:58 +00:00
parent ba800c4d41
commit 732155a028
3 changed files with 10 additions and 5 deletions

View File

@@ -8,6 +8,7 @@
*/
var put_locale = function(svgCanvas, given_param){
var lang_param;
var good_langs = ['cs','nl','en','es','fr','ro','sk'];
if(given_param) {
lang_param = given_param;
} else {
@@ -20,8 +21,14 @@ var put_locale = function(svgCanvas, given_param){
if (lang_param == "")
return;
}
// don't bother on first run if language is English
lang_param = String(lang_param);
// Set to English if language is not in list of good langs
if($.inArray(lang_param, good_langs) == -1) {
lang_param = "en";
}
// don't bother on first run if language is English
if(lang_param.indexOf("en") == 0) return;
}