Skip to content

Instantly share code, notes, and snippets.

@feedhenry-gists
Created June 10, 2011 11:43
Show Gist options
  • Save feedhenry-gists/1018675 to your computer and use it in GitHub Desktop.
Save feedhenry-gists/1018675 to your computer and use it in GitHub Desktop.
Multilingual Support Building Language Example Complete
function updateLanguage(l){
var newLanguage = lang[l]; // Look up the required language in our global
for (id in newLanguage){ // Iterate over key and value pairs
if (newLanguage.hasOwnProperty(id)){
$("#" + id).html(newLanguage[id]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment