L20n

HTML

<h1 l10n-id="title"></h1>

L20n

<title "Hello, world!">

HTML

<h1 l10n-id="title">
  Hello, world!
</h1>

L20n, extracted

<title "Hello, world!">

L20n, English

<title "Hello, world!">

L20n, French

<title "Bonjour le monde !">

JavaScript

document.l10nData
  .timeleft -= .5;

node.retranslate();

L20n

<progress[plural(timeleft)] {
  zero: 'Done',
  almost: 'Almost there!',
  one: '1 minute left',
  many: '{{ timeleft }} 
    minutes left'
}>

L20n, a macro

<plural(n) { 
  n<=0 ? 
    "zero" : 
    n<1 ? 
      "almost" : 
      n==1 ? 
        "one" : "many"
}>

L20n, English

<brandName "Firefox">
<update 
  '{{ brandName }} 
   has been updated.'>

L20n, English

<brandName "Aurora">
<update 
  '{{ brandName }} 
   has been updated.'>

L20n, Polish

<brandName "Firefox"
  gender: 'male'>

L20n, Polish

<brandName "Firefox"
  gender: 'male'>

<brandName "Aurora"
  gender: 'female'>

L20n, Polish

<update[brandName..gender] {
  male: '{{ brandName }} 
    został zaktualizowany.',
  female: '{{ brandName }} 
    została zaktualizowana.'
}>

L20n, Polish

<update[brandName..gender] {
  male: '{{ brandName }} 
    został zaktualizowany.',
  female: '{{ brandName }} 
    została zaktualizowana.'
}>

L20n, Polish

<update[brandName..gender] {
  male: '{{ brandName }} 
    został zaktualizowany.',
  female: '{{ brandName }} 
    została zaktualizowana.'
}>

L20n, English

<brandName "Firefox">
<about 
  'About {{ brandName }}'>

L20n, English

<brandName "Aurora">
<about 
  'About {{ brandName }}'>

O ...

L20n, Polish

<about 
  "O {{ brandName.loc }}">

L20n, Polish

<brandName {
  nom: "Firefox",
  loc: "Firefoksie"
}>

L20n, Polish

<brandName {
  nom: "Aurora",
  loc: "Aurorze"
}>

What's possible?

easy things are easy

complex things are possible

wiki.mozilla.org/L20n

github.com/zbraniecki/l20n

#l20n (irc.mozilla.org)

localization-20 google group