<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JensPetersen</id>
	<title>MozillaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JensPetersen"/>
	<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/Special:Contributions/JensPetersen"/>
	<updated>2026-11-22T11:35:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=L20n:People&amp;diff=79304</id>
		<title>L20n:People</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=L20n:People&amp;diff=79304"/>
		<updated>2008-01-07T23:59:59Z</updated>

		<summary type="html">&lt;p&gt;JensPetersen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you&#039;re interested in talking about L20n or alternative l10n/i18n architectures, add yourself here.&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellpadding=5 cellspacing=0&lt;br /&gt;
|-&lt;br /&gt;
| Axel Hecht &amp;lt;!-- Name --&amp;gt;&lt;br /&gt;
| l10n (at) mozilla.com &amp;lt;!-- email --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Jens Petersen&lt;br /&gt;
| petersen (at) redhat.com&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>JensPetersen</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=L20n/Background&amp;diff=51066</id>
		<title>L20n/Background</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=L20n/Background&amp;diff=51066"/>
		<updated>2007-03-07T04:48:59Z</updated>

		<summary type="html">&lt;p&gt;JensPetersen: /* German sample */ spelling of daisy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
When writing localizable software, in particular in an environment based on a toolkit, software authors and localizers are facing composited strings in the UI. Samples would be strings composited out of templates and computed data like in an address or a generic toolkit error message.&lt;br /&gt;
&lt;br /&gt;
Localizers are facing three major challenges in this context:&lt;br /&gt;
&lt;br /&gt;
# The string composition code includes assumptions on the grammar or composition of text.&lt;br /&gt;
# Different plural forms depending on a value.&lt;br /&gt;
# Different grammatical forms, depending on a given value.&lt;br /&gt;
&lt;br /&gt;
The first item really just covers annoying bugs in the software, but they are way too common, and thus listed.&lt;br /&gt;
&lt;br /&gt;
The second and third item are a tad more tricky, so let&#039;s make an example. It&#039;s based on two rather unfounded assumptions, firstly, that Jägermeister is such a gross drink that it would be of male gender anywhere in the world, and that daisies are cute enough to be female.&lt;br /&gt;
&lt;br /&gt;
=== English sample ===&lt;br /&gt;
10 small Jägermeister hang around.&amp;lt;br&amp;gt;&lt;br /&gt;
9 small Jägermeister hang around.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;... English is a bore ...&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
1 small Jägermeister hangs around.&amp;lt;br&amp;gt;&lt;br /&gt;
Head off and order new ones!&lt;br /&gt;
&lt;br /&gt;
The same with daisies:&lt;br /&gt;
&lt;br /&gt;
10 small daisies hang around.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;... well, yeah, dito ...&#039;&#039;&lt;br /&gt;
1 small daisy hangs around.&amp;lt;br&amp;gt;&lt;br /&gt;
Head off and protect your environment!&lt;br /&gt;
&lt;br /&gt;
Now for the same in German (which is still pretty darn simple)&lt;br /&gt;
=== German sample ===&lt;br /&gt;
10 kleine Jägermeister standen rum.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;... German is a bore ...&#039;&#039;&lt;br /&gt;
1 kleiner Jägermeister stand rum.&amp;lt;br&amp;gt;&lt;br /&gt;
Bestelle eine neue Runde!&lt;br /&gt;
&lt;br /&gt;
10 kleine Butterblümchen standen rum.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;... still ...&#039;&#039;&lt;br /&gt;
1 kleines Butterblümchen stand run.&amp;lt;br&amp;gt;&lt;br /&gt;
Es ist Zeit für ein bisschen Umweltschutz!&lt;br /&gt;
&lt;br /&gt;
Let&#039;s leave the zero value out for this discussion for the moment, because I really just entered fun values there. Let&#039;s assume that we&#039;re in the scenario of a generic toolkit message, and &#039;&#039;Jägermeister&#039;&#039; and &#039;&#039;daisy&#039;&#039; would be product specific. You could just as well think &#039;&#039;Firefox&#039;&#039; and &#039;&#039;Thunderbird&#039;&#039;. Let&#039;s have two variables in this sample, &#039;&#039;name&#039;&#039; for &#039;&#039;Jägermeister&#039;&#039; or &#039;&#039;daisy&#039;&#039; and &#039;&#039;number&#039;&#039; for the values from 10 to 1.&lt;br /&gt;
&lt;br /&gt;
For positive integers, gettext offers a reasonable approach, i.e., you have a macro that returns an index based on a number, and you use that to index an array. gettext does not offer a solution for the grammar and gender problems in this example, though.&lt;br /&gt;
&lt;br /&gt;
For the given languages (and most languages, really), you need to know the gender of &#039;&#039;name&#039;&#039; to create the right composed string. In the common scenario that the value of &#039;&#039;name&#039;&#039; is actually in the localization data of your application, the localizer should know the gender. For other scenarios, there may be hints from the application for common requests like this. In a CRM application, for example, extracting the gender of a contact person shouldn&#039;t be the problem. In the generic case, localizers will have to work around the lack of information like they do today. There&#039;s no way to tell the gender of a person called &amp;quot;Andrea&amp;quot; or &amp;quot;Mic&amp;quot;, or &amp;quot;Moon&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Going back to the three target audiences, the intent of this approach is to shield as much detail of a particular language from the application logic. Thus, no software author should ever see how many grammar variations the currently chosen language would have, all this information should be strictly encapsulated within the localization and the localization library. In addition, it is subject of the third group, people knowing internals of quite a bunch of languages, to create a set of properties and values to be used by applications to mark up for example the gender of an item.&lt;br /&gt;
&lt;br /&gt;
Going back to the zero terms for this example, for a known finite set of values, even this odd-looking case can be handled.&lt;br /&gt;
&lt;br /&gt;
Back to [[L20n]]...&lt;br /&gt;
&lt;br /&gt;
[[category:L20n|Background]]&lt;/div&gt;</summary>
		<author><name>JensPetersen</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=L20n/Examples&amp;diff=51065</id>
		<title>L20n/Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=L20n/Examples&amp;diff=51065"/>
		<updated>2007-03-07T04:27:57Z</updated>

		<summary type="html">&lt;p&gt;JensPetersen: /* Declension demo */ spelling of Finnish&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As L20n is in its very early stages, the current examples are pretty rudimentary and tailored to show the feasibility of particular aspects. They&#039;re not all working on the same fileformat either, merely because that makes them easier to implement. Examples will be listed in chronological order, the further you go down, the bigger will be the differences compared to what&#039;s supposed to be the end result.&lt;br /&gt;
&lt;br /&gt;
Right now, all demos are implemented in js, with varying use of the dojo toolkit, for no particular reason.&lt;br /&gt;
&lt;br /&gt;
== Von allen Gedanken ==&lt;br /&gt;
This revision added macros and expressions, and is the first time we can do demos for plurals again, which happens to be the only new sample this cycle, too. All &#039;&#039;Meet Pete&#039;&#039; examples work without modification.&lt;br /&gt;
&lt;br /&gt;
=== Plurals demo ===&lt;br /&gt;
This demo shows how to create a macro and how to call into it to create strings depending on unknown quantities.&lt;br /&gt;
&lt;br /&gt;
[http://people.mozilla.com/~axel/l20n/js-l20n/sample-04.html Plurals demo]&lt;br /&gt;
&lt;br /&gt;
=== Declension demo ===&lt;br /&gt;
This is a sample to demo the flexibility of l20n, going as far as to provide an extra value for one particular use. Mostly, because I don&#039;t know Finnish at all, so I couldn&#039;t really pick a better name.&lt;br /&gt;
&lt;br /&gt;
Please note that the complexity in this example is only affecting the Finnish localization, the English version remains unaffected.&lt;br /&gt;
&lt;br /&gt;
Thanks to Sini Ruohamaa for the request.&lt;br /&gt;
&lt;br /&gt;
[http://people.mozilla.com/~axel/l20n/js-l20n/sample-05.html Declensions demo]&lt;br /&gt;
&lt;br /&gt;
== Meet Pete ==&lt;br /&gt;
These demos are based on a pretty good grammar for the file formats, but don&#039;t support expressions yet, that&#039;s why there are no plural demos in this section. [http://sluggy.com/daily.php?date=070126 Meet Pete] is the code name for this version.&lt;br /&gt;
&lt;br /&gt;
=== App-Toolkit demo ===&lt;br /&gt;
This demo shows how to compose strings from two separate files, and how to make the resulting string look good. A typical example of a string from toolkit using the application name.&lt;br /&gt;
&lt;br /&gt;
[http://people.mozilla.com/~axel/l20n/js-l20n/sample-01.html app-toolkit demo]&lt;br /&gt;
&lt;br /&gt;
Tested on Firefox 2.&lt;br /&gt;
&lt;br /&gt;
=== Accesskeys demo ===&lt;br /&gt;
This sample shows how to keep things together that belong together. In this case, that happens to be the value and the accesskey attributes for a HTML button. (Sadly, the accesskey doesn&#039;t work in fx2, tips? [https://bugzilla.mozilla.org/show_bug.cgi?id=127411 Bug 127411])&lt;br /&gt;
&lt;br /&gt;
[http://people.mozilla.com/~axel/l20n/js-l20n/sample-02.html accesskeys demo]&lt;br /&gt;
&lt;br /&gt;
=== Language fallback ===&lt;br /&gt;
This sample shows how to implement one locale falling back to another. Using en-GB and en-US with en-GB falling back to en-US is merely because I don&#039;t speak any interesting languages, but the fallback path is totally programmatic and can be any locale to any other.&lt;br /&gt;
&lt;br /&gt;
[http://people.mozilla.com/~axel/l20n/js-l20n/sample-03.html fallback demo]&lt;br /&gt;
&lt;br /&gt;
Back to [[L20n]]...&lt;br /&gt;
&lt;br /&gt;
[[category:L20n]]&lt;/div&gt;</summary>
		<author><name>JensPetersen</name></author>
	</entry>
</feed>