BT

InfoQ Homepage News L20n: JavaScript Localization Framework From Mozilla

L20n: JavaScript Localization Framework From Mozilla

Bookmarks

L20n is an open source, JavaScript localization framework from Mozilla. It is designed to be very expressive along with several features such as adapting to Screen sizes, good separation of concerns, graceful handling of pluralization, support for default when there are multiple variants, and more. 

Staś Małolepszy explains the motivation behind the project -

Localizing Mozilla projects has taught us that as many as 90-95% of messages found in the UI are simple key-value pairs that won't require any advanced knowledge of L20n's features.

So why develop L20n at all? Because it's the remaining 5% that make or break the UI of your app. They're too important to ignore and they are responsible for the experience of your user.

As such, the project tries to keep simple scenarios simple, but also supports complex localizations when needed.

Below are some interesting features of L20n -

A simple but powerful concept that L20n introduces is the concept of Defaults - this allows you to define multiple variants for an entity but also define a default value in case any specific variant is not asked for. This enables translators to progressively tweak their content and even add more variants, while ensuring that existing code using these entities are not affected (by just choosing a default). This is what also allows different localizations to have different degrees of complexity without having to complicate all other localizations.

Here are a few resources to learn more about the project -

L20n has been in development since 2012 and the release candidate for 1.0 has been out since November 2013.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.