Skip to content
fabi1cazenave edited this page Feb 19, 2012 · 4 revisions

Welcome to the webL10n wiki!

Using l10n.js

L10n resource files are linked to HTML documents like this:

<link rel="resource" type="application/l10n" href="data.properties" />
<link rel="resource" type="application/l10n" href="mobile.properties" media="screen and (max-width: 640px)" />

See in these pages how to use these l10n resources in objects and HTML elements. We propose several ways to select a locale.

L10n Resource Formats

l10n.js currently relies on the *.properties format, which is used in most Mozilla and Java projects. It is bullet-proof but limited (= key/value pairs). Our parser supports extensions to *.properties, in order to allow client-side language selection and “import” rules.

To support complex grammatical rules, a more structured data format is required. The *.lol format brings nice features (e.g. macros) but doesn’t suit our needs; that’s why we propose an *.intl format variant, to support advanced features in a more extensible and conventional way.

These (flat) l10n formats are worth mentioning: Mozilla DTD, GNU gettext (jed), Google i18n.