Created
January 6, 2014 22:26
-
-
Save tanrax/8290936 to your computer and use it in GitHub Desktop.
JS: Gestion multidioma
This file contains hidden or 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
<script src="lang/en.js" type="text/javascript"></script> | |
<script src="lang/es.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
var sIdioma = 'en'; | |
if(localStorage['idioma']) { | |
sIdioma = localStorage['idioma']; | |
} | |
$('#bandera').css('background-image', 'url("img/Flag-' + sIdioma + '.png")'); | |
$("#text0").html(eval('sText0' + sIdioma)); | |
$("#text1").html(eval('sText1' + sIdioma)); | |
$("#text2").html(eval('sText2' + sIdioma)); | |
$("#text3").html(eval('sText3' + sIdioma)); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment