Created
June 10, 2011 11:39
-
-
Save feedhenry-gists/1018668 to your computer and use it in GitHub Desktop.
Multilingual Support Language Return Object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buildAllLanguages(){ // Takes the language files & builds them into an object | |
var ret = new Object(); | |
for (var i=0; i<languages.length; i++){ | |
var clIndex = languages[i]; // Current language index: Language identifier string, e.g. "en_gb" | |
var clValue = this[clIndex]; // Current language value. Look for a global by the name clIndex, e.g. this["en_gb"] | |
ret[clIndex] = clValue; // Append this to our return object with the clIndex as the array key, e.g. ret[en_gb] = clValue; | |
} | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment