Created
April 30, 2010 00:30
-
-
Save dorkalev/384507 to your computer and use it in GitHub Desktop.
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
on the client side's HTML HEAD tag you include: | |
<script src="/dictionary.js" type="text/javascript" charset="utf-8"></script> | |
<script> | |
var current_language = "italian"; | |
</script> | |
you manage current_language variable according to user's langauge | |
and where translated text is needed you use the amazing <dictkey> tag: | |
<dictkey>hello</dictkey> | |
or 'dictkeyatt' attribute that indicates which attribute of the element contains a value that should be translated: | |
<input type="submit" value="submit" dictkeyatt="value" /> | |
you will see that: | |
<dictkey>hello</dictkey> CHANGES TO <dictkey>ciao</dictkey> | |
and | |
<input type="submit" value="submit" dictkeyatt="value" /> CHANGES TO <input type="submit" value="vai" dictkeyatt="value" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment