-
“Creating a new localization” on MDC
I did a very brief update to the MDC page on how to create a new localization. You can see that I simply linked to Ben Hearsum’s great post on how he did it.
Ben’s post reminded me that we really need to do an overhaul of our localization documentation. We’ll start to work on that, but any volunteers from the localization community would be greatly appreciated. A great starting point would be to comment here with any MDC docs on localization that you’d like updated.
-
L20n
I spent last week writing about some limitations with DTD files and promised to lead up with something about l20n. In fact, a lot has been written about this concept and can be found here:
The introduction from that page is particularly helpful in describing l20n. It opens with the following:
“L20n is the codename for a localization architecture taking existing approaches one step further. The name stands for l10n 2. The architecture is laid out with Mozilla applications in mind, but should be applicable to other areas as well. As for Mozilla, Mozilla 2 will give us a chance to implement significant changes in our l10n architecture, and this is one attempt to do that.”
It may come as no surprise, but Axel is mostly responsible for this TERRIFIC introduction and write up. The wiki covers:
I really suggest everyone take some time to read through this wiki to get a better sense of what l20n is and how to contribute. Rather than try to rewrite something that is already superb, I highly suggest reading the background document linked to above (and again just now).
Let’s give a taste of just what l20n might be one day. Here is some sample code from Axel that helps with plural forms:
<plural: (n) -> {n != 1}>/** * Complex string * @param: beers */ <axel: "Axel had ${beers}i ${axel.bottles[plural(beers)]}s of beer." bottles: ["bottle", "bottles"]>And the translation by a localizer:
<plural: (n) -> {n != 1}> /** * Complex string * @param: beers */ <axel: "Axel hat ${beers}i ${axel.bottles[plural(beers)]}s Bier getrunken." bottles: ["Flasche", "Flaschen"]>The nice thing here is that the code is flexible to provide for multiple plural forms. Ping if you have a question.
Some really excellent demos are on the Examples link from above. I will link to a few I liked here:
- Plural demo (just above)
- Declension demo
These are great because they show the power and flexibility of the code with a straightforward UI to go along.
There is so much fun to be had with l20n, I hope you take the time to go through this wiki, comment on it, blog about it, email me, etc. We are not ready to implement l20n, but we are certainly ready to discuss.
Thank you to Axel and Gandalf for helping me with these posts. Most of what I write is simply me learning new things and then rewriting. I hope you can play along and get involved in the next generation of Mozilla l10n.