Confirmed users
1,016
edits
(Created page with "= Intro = This document is a tutorial on how to use L20n to localize your HTML web aplication. == Initial setup == We'll operate on an example of a very simple HTML5 document ...") |
No edit summary |
||
| Line 33: | Line 33: | ||
The last piece of the equation is to bind the HTML nodes to their respective localizable elements (called entities) by setting an ''l10n-id'' attribute on each node. | The last piece of the equation is to bind the HTML nodes to their respective localizable elements (called entities) by setting an ''l10n-id'' attribute on each node. | ||
main.lol: | |||
<page "Page"> | |||
<discussion "Discussion"> | |||
<edit "Edit"> | |||
HTML: | HTML: | ||
<html> | |||
<html> | <head> | ||
'''<link rel="resource" type="intl/l20n" href="./locales/main.lol"''' /> | |||
</head> | |||
<body> | |||
<header> | |||
<nav> | |||
<ul> | |||
<li '''l10n-id="page"''' /> | |||
<li '''l10n-id="discussion"''' /> | |||
<li '''l10n-id="edit"''' /> | |||
</ul> | |||
</nav> | |||
</header> | |||
</body> | |||
</html> | |||
</html> | |||
With this change, we now have our document localizable! | With this change, we now have our document localizable! | ||
| Line 68: | Line 67: | ||
HTML: | HTML: | ||
<html> | |||
<html> | <head> | ||
'''<script type="text/javascript;version=1.8" src="./js/l20n-xml.min.js"></script>''' | |||
</head> | |||
<body> | |||
<header> | |||
<nav> | |||
<ul> | |||
<li l10n-id="page" /> | |||
<li l10n-id="discussion" /> | |||
<li l10n-id="edit" /> | |||
</ul> | |||
</nav> | |||
</header> | |||
</body> | |||
</html> | |||
== Pick a language == | == Pick a language == | ||