Created by Zibi "gandalf" Braniecki / @zbraniecki
Technological (API, code)
Localization (translation & culturally-dependant UI)
Management (release cycle, QA, build time services)
Human (localizers, agencies, employees)
client-side
isolated
grammar-agnostic
responsive
based on a social contract
Developers provide important data as context data
mozL10n always returns strings
<h2 data-l10n-id="hello"></h2>
hello = Hello, World!
hello = Witaj świecie!
Establish the social contract via API
Language packs
WebAPI
L20n file format
DOM Overlays
Responsive localization
Resource loading → Gecko
Node l10n → Gecko
Language Negotiation → Library
Langpack service → Library
JS API → Library
hello = Hello, World!
<hello "Hello, World!">
fancyWidget = {[ plural(n) ]}
fancyWidget[zero] = Cities
fancyWidget[one] = City
fancyWidget[many] = Cities
fancyWidget.ariaLabel = Select city
fancyWidget.placeholder = Your city
<fancyWidget[@plural($n)] {
zero: "Cities",
one: "City",
many: "Cities"
}
ariaLabel: "Select city"
placeholder: "Your city">
<liked "{{ $user.name }} liked your photo.">
<liked[$user.gender] {
feminine: "{{ $user.name }} polubiła twoje zdjęcie.",
masculine: "{{ $user.name }} polubił twoje zdjęcie.",
}>
<turnOff[@device.type] {
phone: "Turn off your phone",
tv: "Turn off your TV",
tablet: "Turn off your tablet"
}>
<currentTime "Current time is {{ @formatTime($time, "%H:%i") }}">
<p l10n-id="learnMore">
<img src="./brandLogo.png" />
<a href="http://www.mozilla.org" />
</p>
<learnMore "Learn more about <img/> at our website">
<warning[ @screen.width>480 ? 'short' : 'long' ] {
short: "Warn me before redirect or reload",
long: "Warn me when websites try to redirect or reload the page",
}>
Read more at http://www.l20n.org