<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trosim</id>
		<title>EiffelStudio: an EiffelSoftware project - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trosim"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/Special:Contributions/Trosim"/>
		<updated>2026-05-27T18:52:37Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/dotnet_locale&amp;diff=4415</id>
		<title>Internationalization/dotnet locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/dotnet_locale&amp;diff=4415"/>
				<updated>2006-09-01T12:06:15Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
There is a class named CULTURE_INFO in &amp;quot;mscorlib&amp;quot; in EiffelStudio, which provides information about a specific culture such as:&lt;br /&gt;
* associated language&lt;br /&gt;
* sublanguage&lt;br /&gt;
* country/region&lt;br /&gt;
* calendar&lt;br /&gt;
* cultural conventions&lt;br /&gt;
&lt;br /&gt;
== Listing available locales ==&lt;br /&gt;
I didn't find a function that returns all the available locale informations, I think because under .NET, they are all avaiable.&lt;br /&gt;
&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
To obtain informations on a specific locale, it suffices to create an instance of CULTURE_INFO. There are basically two ways to do this:&lt;br /&gt;
&lt;br /&gt;
# Create it with the culture identifier. This identifier maps every culture/language to an integer. It is not very usefull, because I did not find a logic behind the mapping function... You can find a table on [1]&lt;br /&gt;
# Create it with the name (STRING) of the culture. The culture names follow the RFC 1766 standard in the format &amp;quot;&amp;lt;languagecode2&amp;gt;-&amp;lt;country/regioncode2&amp;gt;&amp;quot;, where &amp;lt;languagecode2&amp;gt; is a lowercase two-letter code derived from ISO 639-1 and &amp;lt;country/regioncode2&amp;gt; is an uppercase two-letter code derived from ISO 3166.&lt;br /&gt;
&lt;br /&gt;
You can find a detailed description of RFC 1766 on [2]&lt;br /&gt;
&lt;br /&gt;
The CULTURE_INFO Class has some attibutes useful for the retrieving of the informations about Date, Time and Number formatting, they are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* date_time_format: DATE_TIME_FORMAT_INFO (see: [3])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Some information that is available in DATE_TIME_FORMAT_INFO&lt;br /&gt;
! Information !! Result for locale &amp;quot;it-CH&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| full_date_time_pattern || dddd, d. MMMM yyyy HH:mm:ss&lt;br /&gt;
|-&lt;br /&gt;
| long_date_pattern || dddd, d. MMMM yyyy&lt;br /&gt;
|-&lt;br /&gt;
| long_time_pattern || HH:mm:ss&lt;br /&gt;
|-&lt;br /&gt;
| month_day_pattern || d. MMMM&lt;br /&gt;
|-&lt;br /&gt;
| rfc1123_pattern || ddd, dd MMM yyyy HH':'mm':'ss 'GMT'&lt;br /&gt;
|-&lt;br /&gt;
| pm_designator ||&lt;br /&gt;
|-&lt;br /&gt;
| short_date_pattern || dd.MM.yyyy&lt;br /&gt;
|-&lt;br /&gt;
| short_time_pattern || HH:mm&lt;br /&gt;
|-&lt;br /&gt;
| sortable_date_time_pattern || yyyy'-'MM'-'dd'T'HH':'mm':'ss&lt;br /&gt;
|-&lt;br /&gt;
| time_separator ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* there are also functions that return abbreviations of names of months and day:&lt;br /&gt;
** get_abbreviated_day_name (dayofweek: DAY_OF_WEEK) : SYSTEM_STRING&lt;br /&gt;
** get_abbreviated_month_name (month: INTEGER) : SYSTEM_STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* number_format: NUMBER_FORMAT_INFO (see: [4])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Some information that is available in NUMBER_FORMAT_INFO&lt;br /&gt;
! Information !! Result for locale &amp;quot;it-CH&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| currency_group_separator || '&lt;br /&gt;
|-&lt;br /&gt;
| currency_symbol || SFr.&lt;br /&gt;
|-&lt;br /&gt;
| currency_decimal_digits || 2&lt;br /&gt;
|-&lt;br /&gt;
| negative_sign || -&lt;br /&gt;
|-&lt;br /&gt;
| number_decimal_digits || 2&lt;br /&gt;
|-&lt;br /&gt;
| number_decimal_separator || .&lt;br /&gt;
|-&lt;br /&gt;
| number_group_separator || '&lt;br /&gt;
|-&lt;br /&gt;
| positive_sign || +&lt;br /&gt;
|-&lt;br /&gt;
| negative_sign || -&lt;br /&gt;
|-&lt;br /&gt;
| negative_infinity_symbol || -Infinito&lt;br /&gt;
|-&lt;br /&gt;
| per_mille_symbol || ë&lt;br /&gt;
|-&lt;br /&gt;
| na_n_symbol || Non un numero reale&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
[1] http://msdn2.microsoft.com/en-us/library/ms172470.aspx&lt;br /&gt;
&lt;br /&gt;
[2] http://www.faqs.org/rfcs/rfc1766.html&lt;br /&gt;
&lt;br /&gt;
[3] http://msdn2.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx&lt;br /&gt;
&lt;br /&gt;
[4] http://msdn2.microsoft.com/en-us/library/system.globalization.numberformatinfo.aspx&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
ms-help://MS.NETFramework.v20.en/cpref8/html/T_System_Globalization_CultureInfo.htm (*)&lt;br /&gt;
&lt;br /&gt;
http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx&lt;br /&gt;
&lt;br /&gt;
see: http://msdn2.microsoft.com/en-us/library/system.globalization.compareinfo.aspx&lt;br /&gt;
&lt;br /&gt;
(*) : ms-help is the .NET documentation&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/nls_locale&amp;diff=4414</id>
		<title>Internationalization/nls locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/nls_locale&amp;diff=4414"/>
				<updated>2006-09-01T12:05:58Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
== Listing available locales ==&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
== Other information ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4413</id>
		<title>Internationalization/posix locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4413"/>
				<updated>2006-09-01T12:05:40Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
== Listing available locales ==&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
== Other information ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/nls_locale&amp;diff=4412</id>
		<title>Internationalization/nls locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/nls_locale&amp;diff=4412"/>
				<updated>2006-09-01T12:04:47Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
== Listing available locales ==&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
== Other information ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/dotnet_locale&amp;diff=4411</id>
		<title>Internationalization/dotnet locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/dotnet_locale&amp;diff=4411"/>
				<updated>2006-09-01T12:03:43Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
There is a class named CULTURE_INFO in &amp;quot;mscorlib&amp;quot; in EiffelStudio, which provides information about a specific culture such as:&lt;br /&gt;
* associated language&lt;br /&gt;
* sublanguage&lt;br /&gt;
* country/region&lt;br /&gt;
* calendar&lt;br /&gt;
* cultural conventions&lt;br /&gt;
&lt;br /&gt;
== Listing available locales ==&lt;br /&gt;
I didn't find a function that returns all the available locale informations, I think because under .NET, they are all avaiable.&lt;br /&gt;
&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
To obtain informations on a specific locale, it suffices to create an instance of CULTURE_INFO. There are basically two ways to do this:&lt;br /&gt;
&lt;br /&gt;
# Create it with the culture identifier. This identifier maps every culture/language to an integer. It is not very usefull, because I did not find a logic behind the mapping function... You can find a table on [1]&lt;br /&gt;
# Create it with the name (STRING) of the culture. The culture names follow the RFC 1766 standard in the format &amp;quot;&amp;lt;languagecode2&amp;gt;-&amp;lt;country/regioncode2&amp;gt;&amp;quot;, where &amp;lt;languagecode2&amp;gt; is a lowercase two-letter code derived from ISO 639-1 and &amp;lt;country/regioncode2&amp;gt; is an uppercase two-letter code derived from ISO 3166.&lt;br /&gt;
&lt;br /&gt;
You can find a detailed description of RFC 1766 on [2]&lt;br /&gt;
&lt;br /&gt;
The CULTURE_INFO Class has some attibutes useful for the retrieving of the informations about Date, Time and Number formatting, they are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* date_time_format: DATE_TIME_FORMAT_INFO (see: [3])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Some information that is available in DATE_TIME_FORMAT_INFO&lt;br /&gt;
! Information !! Result for locale &amp;quot;it-CH&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| full_date_time_pattern || dddd, d. MMMM yyyy HH:mm:ss&lt;br /&gt;
|-&lt;br /&gt;
| long_date_pattern || dddd, d. MMMM yyyy&lt;br /&gt;
|-&lt;br /&gt;
| long_time_pattern || HH:mm:ss&lt;br /&gt;
|-&lt;br /&gt;
| month_day_pattern || d. MMMM&lt;br /&gt;
|-&lt;br /&gt;
| rfc1123_pattern || ddd, dd MMM yyyy HH':'mm':'ss 'GMT'&lt;br /&gt;
|-&lt;br /&gt;
| pm_designator ||&lt;br /&gt;
|-&lt;br /&gt;
| short_date_pattern || dd.MM.yyyy&lt;br /&gt;
|-&lt;br /&gt;
| short_time_pattern || HH:mm&lt;br /&gt;
|-&lt;br /&gt;
| sortable_date_time_pattern || yyyy'-'MM'-'dd'T'HH':'mm':'ss&lt;br /&gt;
|-&lt;br /&gt;
| time_separator ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* there are also functions that return abbreviations of names of months and day:&lt;br /&gt;
** get_abbreviated_day_name (dayofweek: DAY_OF_WEEK) : SYSTEM_STRING&lt;br /&gt;
** get_abbreviated_month_name (month: INTEGER) : SYSTEM_STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* number_format: NUMBER_FORMAT_INFO (see: [4])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Some information that is available in NUMBER_FORMAT_INFO&lt;br /&gt;
! Information !! Result for locale &amp;quot;it-CH&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| currency_group_separator || '&lt;br /&gt;
|-&lt;br /&gt;
| currency_symbol || SFr.&lt;br /&gt;
|-&lt;br /&gt;
| currency_decimal_digits || 2&lt;br /&gt;
|-&lt;br /&gt;
| negative_sign || -&lt;br /&gt;
|-&lt;br /&gt;
| number_decimal_digits || 2&lt;br /&gt;
|-&lt;br /&gt;
| number_decimal_separator || .&lt;br /&gt;
|-&lt;br /&gt;
| number_group_separator || '&lt;br /&gt;
|-&lt;br /&gt;
| positive_sign || +&lt;br /&gt;
|-&lt;br /&gt;
| negative_sign || -&lt;br /&gt;
|-&lt;br /&gt;
| negative_infinity_symbol || -Infinito&lt;br /&gt;
|-&lt;br /&gt;
| per_mille_symbol || ë&lt;br /&gt;
|-&lt;br /&gt;
| na_n_symbol || Non un numero reale&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
[1] http://msdn2.microsoft.com/en-us/library/ms172470.aspx&lt;br /&gt;
&lt;br /&gt;
[2] http://www.faqs.org/rfcs/rfc1766.html&lt;br /&gt;
&lt;br /&gt;
[3] http://msdn2.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx&lt;br /&gt;
&lt;br /&gt;
[4] http://msdn2.microsoft.com/en-us/library/system.globalization.numberformatinfo.aspx&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
ms-help://MS.NETFramework.v20.en/cpref8/html/T_System_Globalization_CultureInfo.htm (*)&lt;br /&gt;
&lt;br /&gt;
http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx&lt;br /&gt;
&lt;br /&gt;
see: http://msdn2.microsoft.com/en-us/library/system.globalization.compareinfo.aspx&lt;br /&gt;
&lt;br /&gt;
(*) : ms-help is the .NET documentation&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/dotnet_locale&amp;diff=4410</id>
		<title>Internationalization/dotnet locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/dotnet_locale&amp;diff=4410"/>
				<updated>2006-09-01T11:46:42Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Listing available locales ==&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/nls_locale&amp;diff=4409</id>
		<title>Internationalization/nls locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/nls_locale&amp;diff=4409"/>
				<updated>2006-09-01T11:46:25Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Listing available locales ==&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4408</id>
		<title>Internationalization/posix locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4408"/>
				<updated>2006-09-01T09:40:39Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Listing available locales ==&lt;br /&gt;
== Checking for default locale ==&lt;br /&gt;
== Retrieving locale information ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4407</id>
		<title>Internationalization/posix locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4407"/>
				<updated>2006-09-01T09:40:18Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Listing available locales =&lt;br /&gt;
= Checking for default locale =&lt;br /&gt;
= Retrieving locale information =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4406</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4406"/>
				<updated>2006-09-01T08:40:42Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Mx: ??? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
===Brief history===&lt;br /&gt;
&lt;br /&gt;
Orginally the internationalisation (i18n) project was started as a required project for an ETH Software Architecture course.&lt;br /&gt;
The result was less then perfect; pages referring to this first version have been given an 'SA' prefix.&lt;br /&gt;
Some members of this SA project team decided to rewrite the library as a semester project. Pages on the wiki not prefixed with 'SA' are either applicable to both or to the semester project.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
=== Specific goals of the semester project ===&lt;br /&gt;
&lt;br /&gt;
''to be completed''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
''add milestones of semesterproject''&lt;br /&gt;
&lt;br /&gt;
==Mx: ??? ==&lt;br /&gt;
* Write a summary of how [[Internationalization/posix_locale|POSIX locale]] information is stored&lt;br /&gt;
* Write a summary of how [[Internationalization/nls_locale|NLS (Windows) locale]] infomation is stored&lt;br /&gt;
* Write a summary of how [[Internationalization/dotnet_locale|.NET locale]] information is stored&lt;br /&gt;
* Write a small summary of date and time classes in EiffelBase&lt;br /&gt;
* Examine the .ts file format, notably plural form handling&lt;br /&gt;
* Examine the .xliff file format, notably plural form handling (we did some of this already)&lt;br /&gt;
* Enter classes &amp;amp; features into EiffelStudio so we have a starting point and a BON diagram&lt;br /&gt;
* Sit down and think about the current class names. Some of them need improving.&lt;br /&gt;
&lt;br /&gt;
==M5: July ?? ==&lt;br /&gt;
* Refactoring of whole library&lt;br /&gt;
* Use our library for EiffelStudio&lt;br /&gt;
* Clean up Wiki and improve Developer manual&lt;br /&gt;
* Add support for other aspects of localisation - dates, number format etc. ''(possibly we can defer this a bit)''&lt;br /&gt;
** Compile a [[Internationalization/l10n_features | list of basic features]] to provide (e.g. date/time format, system locale) ''(deferred from M3)''&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
* [[Internationalization/user_manual|User manual]]: how to use the i18n library&lt;br /&gt;
* [[Internationalization/developer_manual|Developer manual]]: developer manual for the i18n library&lt;br /&gt;
* [[Internationalization/obstacles|Obstacles]]: setbacks we have encountered&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
== Semester project ==&lt;br /&gt;
&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* Supervisor: [[User:Schoelle| Bernd Schoeller]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Old SA project team ==&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4405</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4405"/>
				<updated>2006-09-01T08:37:11Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Milestones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
===Brief history===&lt;br /&gt;
&lt;br /&gt;
Orginally the internationalisation (i18n) project was started as a required project for an ETH Software Architecture course.&lt;br /&gt;
The result was less then perfect; pages referring to this first version have been given an 'SA' prefix.&lt;br /&gt;
Some members of this SA project team decided to rewrite the library as a semester project. Pages on the wiki not prefixed with 'SA' are either applicable to both or to the semester project.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
=== Specific goals of the semester project ===&lt;br /&gt;
&lt;br /&gt;
''to be completed''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
''add milestones of semesterproject''&lt;br /&gt;
&lt;br /&gt;
==Mx: ??? ==&lt;br /&gt;
* Write a summary of how POSIX locale information is stored&lt;br /&gt;
* Write a summary of how NLS (Windows) locale infomation is stored&lt;br /&gt;
* Write a summary of how .NET locale information is stored&lt;br /&gt;
* Write a small summary of date and time classes in EiffelBase&lt;br /&gt;
* Examine the .ts file format, notably plural form handling&lt;br /&gt;
* Examine the .xliff file format, notably plural form handling (we did some of this already)&lt;br /&gt;
* Enter classes &amp;amp; features into EiffelStudio so we have a starting point and a BON diagram&lt;br /&gt;
* Sit down and think about the current class names. Some of them need improving.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==M5: July ?? ==&lt;br /&gt;
* Refactoring of whole library&lt;br /&gt;
* Use our library for EiffelStudio&lt;br /&gt;
* Clean up Wiki and improve Developer manual&lt;br /&gt;
* Add support for other aspects of localisation - dates, number format etc. ''(possibly we can defer this a bit)''&lt;br /&gt;
** Compile a [[Internationalization/l10n_features | list of basic features]] to provide (e.g. date/time format, system locale) ''(deferred from M3)''&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
* [[Internationalization/user_manual|User manual]]: how to use the i18n library&lt;br /&gt;
* [[Internationalization/developer_manual|Developer manual]]: developer manual for the i18n library&lt;br /&gt;
* [[Internationalization/obstacles|Obstacles]]: setbacks we have encountered&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
== Semester project ==&lt;br /&gt;
&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* Supervisor: [[User:Schoelle| Bernd Schoeller]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Old SA project team ==&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4404</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4404"/>
				<updated>2006-09-01T08:20:19Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
===Brief history===&lt;br /&gt;
&lt;br /&gt;
Orginally the internationalisation (i18n) project was started as a required project for an ETH Software Architecture course.&lt;br /&gt;
The result was less then perfect; pages referring to this first version have been given an 'SA' prefix.&lt;br /&gt;
Some members of this SA project team decided to rewrite the library as a semester project. Pages on the wiki not prefixed with 'SA' are either applicable to both or to the semester project.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
=== Specific goals of the semester project ===&lt;br /&gt;
&lt;br /&gt;
''to be completed''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
''add milestones of semesterproject''&lt;br /&gt;
&lt;br /&gt;
==M5: July ?? ==&lt;br /&gt;
* Refactoring of whole library&lt;br /&gt;
* Use our library for EiffelStudio&lt;br /&gt;
* Clean up Wiki and improve Developer manual&lt;br /&gt;
* Add support for other aspects of localisation - dates, number format etc. ''(possibly we can defer this a bit)''&lt;br /&gt;
** Compile a [[Internationalization/l10n_features | list of basic features]] to provide (e.g. date/time format, system locale) ''(deferred from M3)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
* [[Internationalization/user_manual|User manual]]: how to use the i18n library&lt;br /&gt;
* [[Internationalization/developer_manual|Developer manual]]: developer manual for the i18n library&lt;br /&gt;
* [[Internationalization/obstacles|Obstacles]]: setbacks we have encountered&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
== Semester project ==&lt;br /&gt;
&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* Supervisor: [[User:Schoelle| Bernd Schoeller]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Old SA project team ==&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3788</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3788"/>
				<updated>2006-06-25T19:10:45Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* How to translate / use translation files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
There is only a few things which can help you using our library, the most important one is dividing completely the logic of the program from the content.&lt;br /&gt;
In other words, you should write a class which contains all the strings you use in the program; so applying out system will be very easy.&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
Here you can find some instructions to translate the strings of you program, including substituting variables into templates.&lt;br /&gt;
&lt;br /&gt;
=== Translating simple strings ===&lt;br /&gt;
&lt;br /&gt;
If you have a simple string to translate, like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string: STRING&lt;br /&gt;
&lt;br /&gt;
simple_string := &amp;quot;A simple string&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you only have to enclose the string by the simple i18n() function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string := i18n(&amp;quot;A simple string&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the system will then be charged of the translation in whatever language you've chosen.&lt;br /&gt;
&lt;br /&gt;
=== Translating plurals ===&lt;br /&gt;
&lt;br /&gt;
Sometimes you must change the translated string in relation with a variable; this piece of code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string: STRING&lt;br /&gt;
i: INTEGER&lt;br /&gt;
&lt;br /&gt;
if i = 1 then&lt;br /&gt;
  string := &amp;quot;There is 1 file&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
  string := &amp;quot;There are more files&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be written as follows using our system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := i18n_pl(&amp;quot;There is 1 file&amp;quot;, &amp;quot;There are more files&amp;quot;, i)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the right form will be selected and displayed for you.&lt;br /&gt;
&lt;br /&gt;
=== Translating with templates ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|We encourage you to use a stand alone template engine and not rely on our built-in functions, which will not be maintained.}}&lt;br /&gt;
&lt;br /&gt;
You can use our library to translate something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := &amp;quot;Number &amp;quot; + i&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in this way&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := i18n_comp(&amp;quot;Number $1&amp;quot;, [i])&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and of course you can do the same with the plural forms&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
if i = 1 then&lt;br /&gt;
  string := &amp;quot;There is 1 file&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
  string := &amp;quot;There are &amp;quot; + i + &amp;quot; files&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would look like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := i18n_comp_pl(&amp;quot;There is 1 file&amp;quot;, &amp;quot;There are $1 files&amp;quot;, [i], i)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we've so covered all the possibilities.&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;br /&gt;
&lt;br /&gt;
== Editing PO files == &lt;br /&gt;
&lt;br /&gt;
You can edit the PO files created with your preferred editor; some possible tools are listed [[Internationalization/tool_evaluation|here]].&lt;br /&gt;
&lt;br /&gt;
== Issues with MO files ==&lt;br /&gt;
&lt;br /&gt;
Into the header section of the PO file must be present the &amp;quot;Plural-Forms&amp;quot; header.&lt;br /&gt;
&lt;br /&gt;
It looks like this line:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Plural-Forms: nplurals=2; plural=(n!=1);&amp;quot;&lt;br /&gt;
&lt;br /&gt;
with &amp;quot;nplural&amp;quot; being the number of plurals of the destination language and &amp;quot;plural&amp;quot; the C-like function for finding the right plural form starting with an integer.&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3787</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3787"/>
				<updated>2006-06-25T18:58:23Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Translating with templates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
There is only a few things which can help you using our library, the most important one is dividing completely the logic of the program from the content.&lt;br /&gt;
In other words, you should write a class which contains all the strings you use in the program; so applying out system will be very easy.&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
Here you can find some instructions to translate the strings of you program, including substituting variables into templates.&lt;br /&gt;
&lt;br /&gt;
=== Translating simple strings ===&lt;br /&gt;
&lt;br /&gt;
If you have a simple string to translate, like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string: STRING&lt;br /&gt;
&lt;br /&gt;
simple_string := &amp;quot;A simple string&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you only have to enclose the string by the simple i18n() function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string := i18n(&amp;quot;A simple string&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the system will then be charged of the translation in whatever language you've chosen.&lt;br /&gt;
&lt;br /&gt;
=== Translating plurals ===&lt;br /&gt;
&lt;br /&gt;
Sometimes you must change the translated string in relation with a variable; this piece of code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string: STRING&lt;br /&gt;
i: INTEGER&lt;br /&gt;
&lt;br /&gt;
if i = 1 then&lt;br /&gt;
  string := &amp;quot;There is 1 file&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
  string := &amp;quot;There are more files&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be written as follows using our system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := i18n_pl(&amp;quot;There is 1 file&amp;quot;, &amp;quot;There are more files&amp;quot;, i)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the right form will be selected and displayed for you.&lt;br /&gt;
&lt;br /&gt;
=== Translating with templates ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|We encourage you to use a stand alone template engine and not rely on our built-in functions, which will not be maintained.}}&lt;br /&gt;
&lt;br /&gt;
You can use our library to translate something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := &amp;quot;Number &amp;quot; + i&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in this way&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := i18n_comp(&amp;quot;Number $1&amp;quot;, [i])&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and of course you can do the same with the plural forms&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
if i = 1 then&lt;br /&gt;
  string := &amp;quot;There is 1 file&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
  string := &amp;quot;There are &amp;quot; + i + &amp;quot; files&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would look like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := i18n_comp_pl(&amp;quot;There is 1 file&amp;quot;, &amp;quot;There are $1 files&amp;quot;, [i], i)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we've so covered all the possibilities.&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3785</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3785"/>
				<updated>2006-06-25T18:47:51Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Translating plurals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
There is only a few things which can help you using our library, the most important one is dividing completely the logic of the program from the content.&lt;br /&gt;
In other words, you should write a class which contains all the strings you use in the program; so applying out system will be very easy.&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
Here you can find some instructions to translate the strings of you program, including substituting variables into templates.&lt;br /&gt;
&lt;br /&gt;
=== Translating simple strings ===&lt;br /&gt;
&lt;br /&gt;
If you have a simple string to translate, like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string: STRING&lt;br /&gt;
&lt;br /&gt;
simple_string := &amp;quot;A simple string&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you only have to enclose the string by the simple i18n() function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string := i18n(&amp;quot;A simple string&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the system will then be charged of the translation in whatever language you've chosen.&lt;br /&gt;
&lt;br /&gt;
=== Translating plurals ===&lt;br /&gt;
&lt;br /&gt;
Sometimes you must change the translated string in relation with a variable; this piece of code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string: STRING&lt;br /&gt;
i: INTEGER&lt;br /&gt;
&lt;br /&gt;
if i = 1 then&lt;br /&gt;
  string := &amp;quot;There is 1 file&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
  string := &amp;quot;There are more files&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will be written as follows using our system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
string := i18n_pl(&amp;quot;There is 1 file&amp;quot;, &amp;quot;There are more files&amp;quot;, i)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the right form will be selected and displayed for you.&lt;br /&gt;
&lt;br /&gt;
=== Translating with templates ===&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3784</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3784"/>
				<updated>2006-06-25T18:44:40Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Translating simple strings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
There is only a few things which can help you using our library, the most important one is dividing completely the logic of the program from the content.&lt;br /&gt;
In other words, you should write a class which contains all the strings you use in the program; so applying out system will be very easy.&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
Here you can find some instructions to translate the strings of you program, including substituting variables into templates.&lt;br /&gt;
&lt;br /&gt;
=== Translating simple strings ===&lt;br /&gt;
&lt;br /&gt;
If you have a simple string to translate, like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string: STRING&lt;br /&gt;
&lt;br /&gt;
simple_string := &amp;quot;A simple string&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you only have to enclose the string by the simple i18n() function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
simple_string := i18n(&amp;quot;A simple string&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the system will then be charged of the translation in whatever language you've chosen.&lt;br /&gt;
&lt;br /&gt;
=== Translating plurals ===&lt;br /&gt;
&lt;br /&gt;
=== Translating with templates ===&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3783</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3783"/>
				<updated>2006-06-25T18:42:53Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Localization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
There is only a few things which can help you using our library, the most important one is dividing completely the logic of the program from the content.&lt;br /&gt;
In other words, you should write a class which contains all the strings you use in the program; so applying out system will be very easy.&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
Here you can find some instructions to translate the strings of you program, including substituting variables into templates.&lt;br /&gt;
&lt;br /&gt;
=== Translating simple strings ===&lt;br /&gt;
&lt;br /&gt;
=== Translating plurals ===&lt;br /&gt;
&lt;br /&gt;
=== Translating with templates ===&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3782</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3782"/>
				<updated>2006-06-25T18:41:32Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Localization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
There is only a few things which can help you using our library, the most important one is dividing completely the logic of the program from the content.&lt;br /&gt;
In other words, you should write a class which contains all the strings you use in the program; so applying out system will be very easy.&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
=== Translating simple strings ===&lt;br /&gt;
&lt;br /&gt;
=== Translating plurals ===&lt;br /&gt;
&lt;br /&gt;
=== Translating with templates ===&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3781</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3781"/>
				<updated>2006-06-25T18:40:22Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* How to design the software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
There is only a few things which can help you using our library, the most important one is dividing completely the logic of the program from the content.&lt;br /&gt;
In other words, you should write a class which contains all the strings you use in the program; so applying out system will be very easy.&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/locale&amp;diff=3700</id>
		<title>Internationalization/locale</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/locale&amp;diff=3700"/>
				<updated>2006-06-22T14:25:40Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Windows */ - Adjusted code section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
In computing, locale is a set of parameters that defines the user's language, country and any special variant preferences that the user wants to see in their user interface.&lt;br /&gt;
&lt;br /&gt;
== Format of locale on OS's ==&lt;br /&gt;
* windows (for unmanaged code): hexadecimal code consisting of a language code (lower 10 bits) and culture code (upper bits), aka Locale Identifier (LCID)&lt;br /&gt;
* linux, unix: defined as [language[_territory][.codeset][@modifier]]&lt;br /&gt;
&lt;br /&gt;
== Where to find locale ==&lt;br /&gt;
=== Linux ===&lt;br /&gt;
the environment variable is LANG&lt;br /&gt;
&lt;br /&gt;
here is a list for more specific variables:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;3&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! '''Locale category'''&lt;br /&gt;
! '''Application'''&lt;br /&gt;
|-&lt;br /&gt;
|LC_COLLATE&lt;br /&gt;
|Collation of strings (sort order.)&lt;br /&gt;
|-&lt;br /&gt;
|LC_CTYPE&lt;br /&gt;
|Classification and conversion of characters.&lt;br /&gt;
|-&lt;br /&gt;
|LC_MESSAGES&lt;br /&gt;
|Translations of yes and no.&lt;br /&gt;
|-&lt;br /&gt;
|LC_MONETARY&lt;br /&gt;
|Format of monetary values.&lt;br /&gt;
|-&lt;br /&gt;
|LC_NUMERIC&lt;br /&gt;
|Format of non-monetary numeric values. &lt;br /&gt;
|-&lt;br /&gt;
|LC_TIME&lt;br /&gt;
|Date and time formats.&lt;br /&gt;
|-&lt;br /&gt;
|LC_ALL&lt;br /&gt;
|Sets all of the above (overrides all of them.)&lt;br /&gt;
|-&lt;br /&gt;
|LANG&lt;br /&gt;
|Sets all the categories, but can be overridden by the individual locale categories.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
The LCID for &amp;quot;Language for non-Unicode programs&amp;quot; (aka system locale) can be found in the windows registry.&amp;lt;br&amp;gt;&lt;br /&gt;
The LCID of &amp;quot;standards and formats&amp;quot; (aka user locale) doesn't seem to be in the registry nor in the environment variables of windows.&lt;br /&gt;
&lt;br /&gt;
== How to access to locale ==&lt;br /&gt;
=== Linux ===&lt;br /&gt;
The function &amp;quot;get&amp;quot; that fetches the language environment variable (LANG) can be found in class SHARED_EXEC_ENVIRONMENT&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
In Eiffel there exist a &amp;quot;locale_id&amp;quot; in class WEL_COMPARE_ITEM_STRUCT that uses the macro MAKELCID to get the locale identifier (aka LCID) from the language id.&lt;br /&gt;
SUBLANGID takes a language id and returns a sublanguage id like SUBLANG_ITALIAN_SWISS.&lt;br /&gt;
PRIMARYLANGID takes a language id and returns a primary language id like SUBLANG_ITALIAN.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two solutions:&amp;lt;br&amp;gt;&lt;br /&gt;
* Find out how to get the language id&lt;br /&gt;
* Use the locale id (convenient if SortID is needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
Locale id is formed by SortID and LanguageID.&amp;lt;br&amp;gt;&lt;br /&gt;
SortID contains info on the language encoding (?) like japanese unicode order, japanese XJIS order, chinese unicode order, chinese BIG5 order,...&lt;br /&gt;
As one of the predefined LCIDs there is LOCALE_USER_DEFAULT. Problem: what's his hexadecimal code?&amp;lt;br&amp;gt;&lt;br /&gt;
Macros for windows are contained in &amp;quot;windows.h&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Found the macro needed: GetUserDefaultLCID()'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code should then look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
language_id: INTEGER is&lt;br /&gt;
		-- `GetUserDefaultLCID' C encapsulation.&lt;br /&gt;
	external&lt;br /&gt;
		&amp;quot;C [macro %&amp;quot;windows.h%&amp;quot;] : EIF_STRING&amp;quot;&lt;br /&gt;
			-- the macro gives an output of type LCID (is it a string?), ie EIF_STRING needs to be changed accordingly if possible&lt;br /&gt;
	alias&lt;br /&gt;
		&amp;quot;GetUserDefaultLCID&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References and useful links ==&lt;br /&gt;
* [http://www-950.ibm.com/software/globalization/icu/demo/locales info] about what's contained in a locale (language codes, time format,...)&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Date_and_time_notation_by_country date and time notations]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Locale Locale on wikipedia]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3680</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3680"/>
				<updated>2006-06-21T17:54:21Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Cosmetics&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= How to design the software =&lt;br /&gt;
&lt;br /&gt;
= How to use the library =&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
=== Creating a datasource ===&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
=== Creating a datastructure ===&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
=== Loading the localizator ===&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
&lt;br /&gt;
= How to translate / use translation files =&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3679</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3679"/>
				<updated>2006-06-21T15:02:59Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Loading the localizator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= Developer manual =&lt;br /&gt;
&lt;br /&gt;
== How to design the software ==&lt;br /&gt;
&lt;br /&gt;
== How to use the library ==&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
=== Initialization ===&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
==== Creating a datasource ====&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
==== Creating a datastructure ====&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
==== Loading the localizator ====&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|If you don't assign a source AND a structure AND then call load, the system will continue to use the old ones.}}&lt;br /&gt;
&lt;br /&gt;
=== Localization ===&lt;br /&gt;
&lt;br /&gt;
== How to translate / use translation files ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3678</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3678"/>
				<updated>2006-06-21T14:57:56Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* How to use the library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= Developer manual =&lt;br /&gt;
&lt;br /&gt;
== How to design the software ==&lt;br /&gt;
&lt;br /&gt;
== How to use the library ==&lt;br /&gt;
&lt;br /&gt;
Here you can find instructions on how to use our library; how to initialize the system and how to make the translations actually appear in your application.&lt;br /&gt;
&lt;br /&gt;
=== Initialization ===&lt;br /&gt;
&lt;br /&gt;
To initialize the library you should have a class that inherits from the SHARED_I18N_LOCALIZATOR; this will bring you all the necessary infrastructure to start localizing your software.&lt;br /&gt;
&lt;br /&gt;
What to do?&lt;br /&gt;
* create datasource&lt;br /&gt;
* create datastructure&lt;br /&gt;
* load localizator&lt;br /&gt;
&lt;br /&gt;
==== Creating a datasource ====&lt;br /&gt;
&lt;br /&gt;
We equip you with a simple factory to create the sources, simply create an I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory: I18N_DATASOURCE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datasource_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you now have the possibility to create a new source based on an mo file, as follows&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource: I18N_DATASOURCE&lt;br /&gt;
&lt;br /&gt;
datasource_factory.use_mo_file(mo_file_path)&lt;br /&gt;
if datasource_factory.last_datasource /= Void then&lt;br /&gt;
  datasource := datasource_factory.last_datasource&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if something went wrong, you can alway fallback with an empty datasource&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datasource_factory.use_empty_source&lt;br /&gt;
datasource := datasource_factory.last_datasource&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The datasource is ready, you should create a datastructure for storing the strings.&lt;br /&gt;
&lt;br /&gt;
==== Creating a datastructure ====&lt;br /&gt;
&lt;br /&gt;
We provide you with a simple factory to create datastructures, so follow the example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory: I18N_DATASTRUCTURE_FACTORY&lt;br /&gt;
&lt;br /&gt;
create datastructure_factory.make&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now create, for example, an hash table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure: I18N_DATASTRUCTURE&lt;br /&gt;
&lt;br /&gt;
datastructure_factory.use_hash_table&lt;br /&gt;
if datastructure_factory.last_datastructure /= Void then&lt;br /&gt;
  datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and, even in this case, if something went wrong, you can create a dummy datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
datastructure_factory.use_dummy&lt;br /&gt;
datastructure := datastructure_factory.last_datastructure&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the datastructure ready, you can load the localizator.&lt;br /&gt;
&lt;br /&gt;
==== Loading the localizator ====&lt;br /&gt;
&lt;br /&gt;
It's important that you do this part before trying to localize any string, if not, the localizator would serve you what you pass as argument.&lt;br /&gt;
&lt;br /&gt;
Pass the source to the localizator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datasource(datasource)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then pass the datastructure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_use_datastructure(datastructure)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally load the localizator with the new source and structure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n_load&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working localization environment!&lt;br /&gt;
&lt;br /&gt;
{{Warning|You should not load a new source or structure after the call to i18n_load, or the system will break.}}&lt;br /&gt;
&lt;br /&gt;
=== Localization ===&lt;br /&gt;
&lt;br /&gt;
== How to translate / use translation files ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3677</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3677"/>
				<updated>2006-06-21T14:26:29Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Added to category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
= Developer manual =&lt;br /&gt;
&lt;br /&gt;
== How to design the software ==&lt;br /&gt;
&lt;br /&gt;
== How to use the library ==&lt;br /&gt;
&lt;br /&gt;
=== Initialization ===&lt;br /&gt;
&lt;br /&gt;
=== Localization ===&lt;br /&gt;
&lt;br /&gt;
== How to translate / use translation files ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3676</id>
		<title>Internationalization/developer manual</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/developer_manual&amp;diff=3676"/>
				<updated>2006-06-21T14:25:23Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Skeleton&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Developer manual =&lt;br /&gt;
&lt;br /&gt;
== How to design the software ==&lt;br /&gt;
&lt;br /&gt;
== How to use the library ==&lt;br /&gt;
&lt;br /&gt;
=== Initialization ===&lt;br /&gt;
&lt;br /&gt;
=== Localization ===&lt;br /&gt;
&lt;br /&gt;
== How to translate / use translation files ==&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/translation&amp;diff=3675</id>
		<title>Internationalization/translation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/translation&amp;diff=3675"/>
				<updated>2006-06-21T13:56:17Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
The translation of EiffelStudio is going on [http://slhk.ath.cx/projects/estudio/ here].&lt;br /&gt;
&lt;br /&gt;
EiffelStudio contains many sectorial terms, wich may have a corresponding expression in other languages but their meaning may not be clear enough to the end user.&lt;br /&gt;
&lt;br /&gt;
This page is intended for discussion on terms difficult to translate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ancestor&lt;br /&gt;
* it: Antenato&lt;br /&gt;
* fr: Ancêtre &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Callers&lt;br /&gt;
* it: chiamanti&lt;br /&gt;
*fr: ''Appeleur'' is a possiblity but it sounds ugly and is possibly not common usage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finalize&lt;br /&gt;
* it: finalizza -&amp;gt; finalized == finalizzato&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parent&lt;br /&gt;
* it: genitore&lt;br /&gt;
&lt;br /&gt;
Put Handle Left&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step Out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppliers&lt;br /&gt;
* it: fornitori&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Toggle visibility&lt;br /&gt;
* it: Mostra/nascondi ''[used]''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Watch&lt;br /&gt;
* it: osserva&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wizard&lt;br /&gt;
* it: Procedura guidata ''[used]'', wizard ''[used in menu]''&lt;br /&gt;
&lt;br /&gt;
Inheritance&lt;br /&gt;
* it: Ereditarietà&lt;br /&gt;
&lt;br /&gt;
Heir&lt;br /&gt;
* it: Erede =&amp;gt; Heirs: eredi&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Following words are left unchanged&lt;br /&gt;
* it: file, inheritance, overflow, stack, feature, routine, cluster&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3643</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3643"/>
				<updated>2006-06-20T12:59:01Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June 13 ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* Test unicode support in Vision2. [See test application in the [https://eiffelsoftware.origo.ethz.ch/svn/es/branches/soft-arch/Src/library/i18n/example/ SVN repository]]&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
==M4: June ??? ==&lt;br /&gt;
* internationalization of EiffelStudio: surround strings with our functions&lt;br /&gt;
* [[Internationalization/translation|translation]] of EiffelStudio in some languages, for demo purposes (Italian, German, Chinese, ...) (see [http://slhk.ath.cx/projects/estudio/ pootle])&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .pot file ''(Leo)''&lt;br /&gt;
* language selection: add an entry in the preferences system&lt;br /&gt;
* create a function to detect current environment language and settings (aka [[Internationalization/locale|locale]])&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programs with translation facilities.&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
* [[Internationalization/requirements_specification|Requirements specification]]&lt;br /&gt;
* [[Internationalization/developer_manual|Developer manual]]&lt;br /&gt;
* [[Internationalization/obstacles|Obstacles]]: why can't achieve all of our goals&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3557</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3557"/>
				<updated>2006-06-17T09:32:36Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June 13 ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* Test unicode support in Vision2. [See test application in the [https://eiffelsoftware.origo.ethz.ch/svn/es/branches/soft-arch/Src/library/i18n/example/ SVN repository]]&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
==M4: June ??? ==&lt;br /&gt;
* internationalization of EiffelStudio: surround strings with our functions&lt;br /&gt;
* [[Internationalization/translation|translation]] of EiffelStudio in some languages, for demo purposes (Italian, German, Chinese, ...) (see [http://slhk.ath.cx/projects/estudio/ pootle])&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .pot file ''(Leo)''&lt;br /&gt;
* language selection: add an entry in the preferences system&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programs with translation facilities.&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
* [[Internationalization/requirements_specification|Requirements specification]]&lt;br /&gt;
* I've downloaded EiffelStudio and would like to use it in my language... -&amp;gt; User manual?&lt;br /&gt;
* [[Internationalization/developer_manual|Developer manual]]&lt;br /&gt;
* [[Internationalization/obstacles|Obstacles]]: why can't achieve all of our goals&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=User_talk:Carlo&amp;diff=3549</id>
		<title>User talk:Carlo</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=User_talk:Carlo&amp;diff=3549"/>
				<updated>2006-06-16T22:59:01Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Let's Fly Hawaii'' (as memorial I think it suffices) [[User:Trosim|Trosim]] 17:33, 12 May 2006 (CEST)&lt;br /&gt;
:I want the details Monday. I think I should have come :) [[User:Leo|Leo]] 00:55, 13 May 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I would have written it on the page... our users are the developers, not bad: only one manual ;-) [[User:Trosim|Trosim]] 00:59, 17 June 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3546</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3546"/>
				<updated>2006-06-16T20:26:40Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Documentation section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June 13 ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* Test unicode support in Vision2. [See test application in the [https://eiffelsoftware.origo.ethz.ch/svn/es/branches/soft-arch/Src/library/i18n/example/ SVN repository]]&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
==M4: June ??? ==&lt;br /&gt;
* internationalization of EiffelStudio: surround strings with our functions&lt;br /&gt;
* [[Internationalization/translation|translation]] of EiffelStudio in some languages, for demo purposes (Italian, German, Chinese, ...) (see [http://slhk.ath.cx/projects/estudio/ pootle])&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .pot file ''(Leo)''&lt;br /&gt;
* language selection: add an entry in the preferences system&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programms with translation facilities.&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
* [[Internationalization/requirements_specification|Requirements specification]]&lt;br /&gt;
* [[Internationalization/user_manual|User manual]]&lt;br /&gt;
* [[Internationalization/obstacles|Obstacles]]: why can't achieve all of our goals&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3526</id>
		<title>Internationalization/class structure</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3526"/>
				<updated>2006-06-16T11:41:42Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Class structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Class structure ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Internationalization-ClassDiagram.png|Class Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Class description ==&lt;br /&gt;
&lt;br /&gt;
{{Warning|The information below is not up-to-date, revision coming soon.}}&lt;br /&gt;
&lt;br /&gt;
That's the actual structure of the whole thing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR =&amp;gt; I18N_LOCALIZATOR =&amp;gt; I18N_TEMPLATE_FORMATTER, (I18N_DATASTRUCTURE =&amp;gt; I18N_MO_PARSER, I18N_PLURAL_FORMS)&lt;br /&gt;
::^&lt;br /&gt;
::|&lt;br /&gt;
CLASS_TO_LOCALIZE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CLASS_TO_LOCALIZE simply inherits from our SHARED_I18N_LOCALIZATOR, which only purpose is to return always the same &amp;quot;localizator: I18N_LOCALIZATOR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This class will in turn ask the archive for the translated strings and then pass it, along with all the arguments, to the template formatter, which will produce the final displayable string.&lt;br /&gt;
&lt;br /&gt;
The datastructure will use the mo_parser for the initial filling of the datastructure (proposal: do it incrementally); the plural forms resolver will be used to find out which plural form should be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All this structure is already in place; we don't know yet how to open the right file, should be implemented by an environment variable or for example with a drop-down menu in the configuration dialog?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR&lt;br /&gt;
&lt;br /&gt;
* translator: I18N_LOCALIZATOR&lt;br /&gt;
* i18n(string): STRING&lt;br /&gt;
* i18n_comp(string, args): STRING (or what you want)&lt;br /&gt;
i18n (i18n_pl) and i18n_comp (i18n_comp_pl) are interfaces to the translator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_LOCALIZATOR&lt;br /&gt;
* archive: I18N_DATASTRUCTURE&lt;br /&gt;
* ask(string): STRING (simple interface to ask the archive)&lt;br /&gt;
* solve_template(string, args): STRING (function that compose a string from template+arguments)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_DATASCTRUCTURE&lt;br /&gt;
* mo_parser: I18N_MO_PARSER&lt;br /&gt;
* load(n) (interface to the parser)&lt;br /&gt;
* translate(STRING): STRING (interface to the I18N_LOCALIZATOR)&lt;br /&gt;
* data_structure: HASH|ARRAY (where the strings are effectively stored)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_MO_PARSER&lt;br /&gt;
* open(file)&lt;br /&gt;
* load(n): STRING&lt;br /&gt;
* load_translated(n): STRING&lt;br /&gt;
* load_hash_entry(n): STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_PLURAL_FORMS (more on this [[Internationalization/plural_forms|here]])&lt;br /&gt;
* get_plural_form(n): INTEGER (interface to the datastructure)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_TEMPLATE_FORMATTER&lt;br /&gt;
* solve_template(a_template: STRING_32; a_args: TUPLE): STRING_32 (interface to the localizator)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=File:Internationalization-ClassDiagram.png&amp;diff=3525</id>
		<title>File:Internationalization-ClassDiagram.png</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=File:Internationalization-ClassDiagram.png&amp;diff=3525"/>
				<updated>2006-06-16T11:39:08Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Diagram that shows the class structure of the Internationalization project.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Diagram that shows the class structure of the Internationalization project.&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3466</id>
		<title>Internationalization/class structure</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3466"/>
				<updated>2006-06-14T21:43:56Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Class structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Class structure ==&lt;br /&gt;
&lt;br /&gt;
{{Warning|We are refactoring the whole thing, more infos coming soon.}}&lt;br /&gt;
&lt;br /&gt;
That's the actual structure of the whole thing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR =&amp;gt; I18N_LOCALIZATOR =&amp;gt; I18N_TEMPLATE_FORMATTER, (I18N_DATASTRUCTURE =&amp;gt; I18N_MO_PARSER, I18N_PLURAL_FORMS)&lt;br /&gt;
::^&lt;br /&gt;
::|&lt;br /&gt;
CLASS_TO_LOCALIZE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CLASS_TO_LOCALIZE simply inherits from our SHARED_I18N_LOCALIZATOR, which only purpose is to return always the same &amp;quot;localizator: I18N_LOCALIZATOR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This class will in turn ask the archive for the translated strings and then pass it, along with all the arguments, to the template formatter, which will produce the final displayable string.&lt;br /&gt;
&lt;br /&gt;
The datastructure will use the mo_parser for the initial filling of the datastructure (proposal: do it incrementally); the plural forms resolver will be used to find out which plural form should be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All this structure is already in place; we don't know yet how to open the right file, should be implemented by an environment variable or for example with a drop-down menu in the configuration dialog?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR&lt;br /&gt;
&lt;br /&gt;
* translator: I18N_LOCALIZATOR&lt;br /&gt;
* i18n(string): STRING&lt;br /&gt;
* i18n_comp(string, args): STRING (or what you want)&lt;br /&gt;
i18n (i18n_pl) and i18n_comp (i18n_comp_pl) are interfaces to the translator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_LOCALIZATOR&lt;br /&gt;
* archive: I18N_DATASTRUCTURE&lt;br /&gt;
* ask(string): STRING (simple interface to ask the archive)&lt;br /&gt;
* solve_template(string, args): STRING (function that compose a string from template+arguments)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_DATASCTRUCTURE&lt;br /&gt;
* mo_parser: I18N_MO_PARSER&lt;br /&gt;
* load(n) (interface to the parser)&lt;br /&gt;
* translate(STRING): STRING (interface to the I18N_LOCALIZATOR)&lt;br /&gt;
* data_structure: HASH|ARRAY (where the strings are effectively stored)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_MO_PARSER&lt;br /&gt;
* open(file)&lt;br /&gt;
* load(n): STRING&lt;br /&gt;
* load_translated(n): STRING&lt;br /&gt;
* load_hash_entry(n): STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_PLURAL_FORMS (more on this [[Internationalization/plural_forms|here]])&lt;br /&gt;
* get_plural_form(n): INTEGER (interface to the datastructure)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_TEMPLATE_FORMATTER&lt;br /&gt;
* solve_template(a_template: STRING_32; a_args: TUPLE): STRING_32 (interface to the localizator)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3405</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3405"/>
				<updated>2006-06-13T19:17:09Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Overview */ Added obstacles section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
== Obstacles ==&lt;br /&gt;
&lt;br /&gt;
We can't achieve all of our goals because there is a lot of work to do in other parts of EiffelStudio, in this page we describe the [[Internationalization/obstacles|obstacles]].&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June 13 ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* Test unicode support in Vision2. [See test application in the [https://eiffelsoftware.origo.ethz.ch/svn/es/branches/soft-arch/Src/library/i18n/example/ SVN repository]]&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
==M4: June ??? ==&lt;br /&gt;
* internationalization of EiffelStudio: surround strings with our functions&lt;br /&gt;
* [[Internationalization/translation|translation]] of EiffelStudio in some languages, for demo purposes (Italian, German, Chinese, ...) (see [http://slhk.ath.cx/projects/estudio/ pootle])&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .pot file ''(Leo)''&lt;br /&gt;
* language selection: add an entry in the preferences system&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programms with translation facilities.&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Talk:Internationalization/translation_function&amp;diff=3320</id>
		<title>Talk:Internationalization/translation function</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Talk:Internationalization/translation_function&amp;diff=3320"/>
				<updated>2006-06-12T09:01:36Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Globality ==&lt;br /&gt;
Content moved to [[Internationalization/class_structure|class structure]]. [[User:Trosim|Trosim]] 12:29, 24 May 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
==Propose==&lt;br /&gt;
&lt;br /&gt;
As I said, this is only a suggestion, I have syntactical and semantic criticism (tuple, tuple item types, names, plural form,...), too. But I made it to give our group a boost.&lt;br /&gt;
So '''please''' make some changes and/or criticize my solution!!  [[User:Etienner|&amp;lt;font color=&amp;quot;Yellow&amp;quot;&amp;gt;'''E'''&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;Black&amp;quot;&amp;gt;'''T'''&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;Yellow&amp;quot;&amp;gt;'''N'''&amp;lt;/font&amp;gt;]] &amp;lt;sup&amp;gt;[[User talk:Etienner|'''&amp;lt;font color=&amp;quot;Yellow&amp;quot;&amp;gt;talk&amp;lt;/font&amp;gt;''']]&amp;lt;/sup&amp;gt; 09:00, 25 May 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use STRING_32 instead of STRING for output. Use STRING_GENERAL whenever it is possible on input.&lt;br /&gt;
--[[User:Manus|manus]] 16:23, 25 May 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
&lt;br /&gt;
A new class (I18N_TEMPLATE_FORMATTER) has been writte by Trosim, but it would be nice to use existing ones. It happens that ST_FORMATTER (part of Gobo) is explicitly excluded from the library, somebody knows the reason?&lt;br /&gt;
&lt;br /&gt;
At present when translating a template you must already give the variables that must be substituted. In many situations it is useful to separate translation from variable substitution. This is what I'm working on.&lt;br /&gt;
--[[User:Carlo|Carlo]] 10:32, 10 June 2006 (CEST)&lt;br /&gt;
:I think we can simply fix this providing two different functions to translate and to substitute the variables, enabling the user to make it in two steps instead of automatically doing that direcly on the localizator's side (I can do that and then we decide what to keep or not). [[User:Trosim|Trosim]] 21:56, 11 June 2006 (CEST)&lt;br /&gt;
:Other simple solutions (proposed on the mailing list): leave the filling of the template to the programmer, eventually offering the possibility (as of now) to do it automatically. I disagree the refactoring proposed. [[User:Trosim|Trosim]] 11:01, 12 June 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Talk:Internationalization/translation_function&amp;diff=3319</id>
		<title>Talk:Internationalization/translation function</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Talk:Internationalization/translation_function&amp;diff=3319"/>
				<updated>2006-06-11T19:56:41Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Templates */ Possible temporary solution&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Globality ==&lt;br /&gt;
Content moved to [[Internationalization/class_structure|class structure]]. [[User:Trosim|Trosim]] 12:29, 24 May 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
==Propose==&lt;br /&gt;
&lt;br /&gt;
As I said, this is only a suggestion, I have syntactical and semantic criticism (tuple, tuple item types, names, plural form,...), too. But I made it to give our group a boost.&lt;br /&gt;
So '''please''' make some changes and/or criticize my solution!!  [[User:Etienner|&amp;lt;font color=&amp;quot;Yellow&amp;quot;&amp;gt;'''E'''&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;Black&amp;quot;&amp;gt;'''T'''&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;Yellow&amp;quot;&amp;gt;'''N'''&amp;lt;/font&amp;gt;]] &amp;lt;sup&amp;gt;[[User talk:Etienner|'''&amp;lt;font color=&amp;quot;Yellow&amp;quot;&amp;gt;talk&amp;lt;/font&amp;gt;''']]&amp;lt;/sup&amp;gt; 09:00, 25 May 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use STRING_32 instead of STRING for output. Use STRING_GENERAL whenever it is possible on input.&lt;br /&gt;
--[[User:Manus|manus]] 16:23, 25 May 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
&lt;br /&gt;
A new class (I18N_TEMPLATE_FORMATTER) has been writte by Trosim, but it would be nice to use existing ones. It happens that ST_FORMATTER (part of Gobo) is explicitly excluded from the library, somebody knows the reason?&lt;br /&gt;
&lt;br /&gt;
At present when translating a template you must already give the variables that must be substituted. In many situations it is useful to separate translation from variable substitution. This is what I'm working on.&lt;br /&gt;
--[[User:Carlo|Carlo]] 10:32, 10 June 2006 (CEST)&lt;br /&gt;
:I think we can simply fix this providing two different functions to translate and to substitute the variables, enabling the user to make it in two steps instead of automatically doing that direcly on the localizator's side (I can do that and then we decide what to keep or not). [[User:Trosim|Trosim]] 21:56, 11 June 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3257</id>
		<title>Internationalization/translation function</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3257"/>
				<updated>2006-06-08T15:20:53Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Changed escape character&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The problem for the translation is that we need a way to translate three different types of string:&lt;br /&gt;
&lt;br /&gt;
* normal strings&lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A normal string&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* composed string &lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A string composed by &amp;quot; + count.out + &amp;quot; strings, like this or &amp;quot; + a_string + &amp;quot;%N&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* strings with plural form&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
 if n = 1 then&lt;br /&gt;
     Result := &amp;quot;a string&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
     Result := &amp;quot;strings&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another problem is that not all languages have the same rules for plural forms, see below and [[internationalization/plural_forms|here]] for more details.&lt;br /&gt;
&lt;br /&gt;
==Possible solution==&lt;br /&gt;
&lt;br /&gt;
I [[Talk:Internationalization/translation_function|'''propose''']] a solution, with four functions (I've got little fantasy for the function names):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n(a_string: STRING_GENERAL): STRING_32&lt;br /&gt;
    -- Function for the translation of normal strings&lt;br /&gt;
&lt;br /&gt;
i18n_pl(strings: TUPLE[STRING_GENERAL]; form: INTEGER): STRING_32&lt;br /&gt;
    -- Function for the translation of normal strings&lt;br /&gt;
    -- with plural form&lt;br /&gt;
&lt;br /&gt;
i18n_comp(a_string: STRING_GENERAL; args: TUPLE): STRING_32&lt;br /&gt;
    -- Function for the translation of composit strings&lt;br /&gt;
&lt;br /&gt;
i18n_comp_pl(strings: TUPLE[STRING_GENERAL]; args: TUPLE; form: INTEGER): STRING_32&lt;br /&gt;
    -- Function for the translation of composit&lt;br /&gt;
    -- strings with plural forms&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this solution, the programmer should write composit strings as (or in a similar way) he would do for the C ''printf'' function. The composit string above would be something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N] i18n_comp(&amp;quot;A string composed by $1 strings, like this or $2%N&amp;quot;, [count, a_string])&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where ''$1'' is the place where the first string in the argument tuple (here ''count'') has to go. I've [[Talk:Internationalization/translation_function|'''choosen''']] that the items in the argument tuple are of type ANY, to insert them in the string we have to apply the functon ''out'' to all items.&lt;br /&gt;
&lt;br /&gt;
===An example===&lt;br /&gt;
&lt;br /&gt;
A complete example of how it could work.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Piece of code without internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
if n = 1&lt;br /&gt;
io.put_string(&amp;quot;Remove file &amp;quot; + file_name.out + &amp;quot;?%N&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
io.put_string (&amp;quot;Delete following files?&amp;quot; + list.out + &amp;quot; there are &amp;quot;&lt;br /&gt;
                + list.count.out + &amp;quot;files%N&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Piece of code with internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file $1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? $2 there are $3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], n))&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the content of the PO file would be:&lt;br /&gt;
&lt;br /&gt;
 #: A comment&lt;br /&gt;
 msgid &amp;quot;Remove file $1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? $2 there are $3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file $1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? $2 ce ne sono $3%N&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You might ask yourself, ''why a function for all the pluralforms''?&lt;br /&gt;
&lt;br /&gt;
The number of plural forms differ between languages. This is somewhat surprising for those who only have experiences with Romanic and Germanic languages since here the number is the same (there are two). &lt;br /&gt;
But other language families have only one form or many forms. For example,&lt;br /&gt;
&lt;br /&gt;
In Polish the translation of file is plik, and the plural forms are: &lt;br /&gt;
 &lt;br /&gt;
:2,3,4 pliki&lt;br /&gt;
:5-21 pliko'w&lt;br /&gt;
:22-24 pliki&lt;br /&gt;
:25-31 pliko'w&lt;br /&gt;
:and so on...&lt;br /&gt;
&lt;br /&gt;
for more information about this topic go [http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC150 here]&lt;br /&gt;
&lt;br /&gt;
==Additional things==&lt;br /&gt;
&lt;br /&gt;
A nice thing we could do, when parsing the source code of a program to internationalize, is to recognize comments about the string.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file $1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? $2 there are $3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], list_count))&lt;br /&gt;
-- A comment of the author&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would then look like this in the PO file:&lt;br /&gt;
&lt;br /&gt;
 #. A comment of the author&lt;br /&gt;
 #. Function name, class name, file path&lt;br /&gt;
 #. $1 = file_name&lt;br /&gt;
 #. $2 = list&lt;br /&gt;
 #. $3 = list_count&lt;br /&gt;
 msgid &amp;quot;Remove file $1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? $2 there are $3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file $1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? $2 ce ne sono $3%N&amp;quot;&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3246</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3246"/>
				<updated>2006-06-08T08:59:19Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* M4: June ??? */ Pootle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
==Who should do the achieving?==&lt;br /&gt;
It is clear that our [[User:Carlo|Glorious Leader]] should be credited with any achieving. However he will have to delegate things somewhat, as he is is not [http://en.wikipedia.org/wiki/Aleksei_Grigorievich_Stakhanov Stakhanov].&lt;br /&gt;
We can probably divide the project into the following parts, modulo preliminary research:&lt;br /&gt;
&lt;br /&gt;
''This should be probably be completed after we have got past M1''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June 13 ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* Test unicode support in Vision2. [See test application in the [https://eiffelsoftware.origo.ethz.ch/svn/es/branches/soft-arch/Src/library/i18n/example/ SVN repository]]&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .po file ''(Leo)'' ''[deferred]''&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
==M4: June ??? ==&lt;br /&gt;
* internationalization of EiffelStudio: surround strings with our functions&lt;br /&gt;
* localizations: actual translations in some languages for demo purposes (Italian, German, Chinese, ...) (see [http://slhk.ath.cx/projects/estudio/ pootle])&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .po file ''(Leo)''&lt;br /&gt;
* language selection: add an entry in the preference system&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale)&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programms with translation facilities.&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3245</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3245"/>
				<updated>2006-06-08T08:50:48Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Milestones */ Rereorganizing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
==Who should do the achieving?==&lt;br /&gt;
It is clear that our [[User:Carlo|Glorious Leader]] should be credited with any achieving. However he will have to delegate things somewhat, as he is is not [http://en.wikipedia.org/wiki/Aleksei_Grigorievich_Stakhanov Stakhanov].&lt;br /&gt;
We can probably divide the project into the following parts, modulo preliminary research:&lt;br /&gt;
&lt;br /&gt;
''This should be probably be completed after we have got past M1''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June 13 ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* Test unicode support in Vision2. [See test application in the [https://eiffelsoftware.origo.ethz.ch/svn/es/branches/soft-arch/Src/library/i18n/example/ SVN repository]]&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .po file ''(Leo)'' ''[deferred]''&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
==M4: June ??? ==&lt;br /&gt;
* internationalization of EiffelStudio: surround strings with our functions&lt;br /&gt;
* localizations: actual translations in some languages for demo purposes (English, Italian, German, Chinese, ...)&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .po file ''(Leo)''&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale)&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programms with translation facilities.&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3244</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3244"/>
				<updated>2006-06-08T08:44:39Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Milestones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
==Who should do the achieving?==&lt;br /&gt;
It is clear that our [[User:Carlo|Glorious Leader]] should be credited with any achieving. However he will have to delegate things somewhat, as he is is not [http://en.wikipedia.org/wiki/Aleksei_Grigorievich_Stakhanov Stakhanov].&lt;br /&gt;
We can probably divide the project into the following parts, modulo preliminary research:&lt;br /&gt;
&lt;br /&gt;
''This should be probably be completed after we have got past M1''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June ??? ==&lt;br /&gt;
:At good point:&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)'' ''[done]''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:What need work:&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .po file ''(Leo)''&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* Test unicode support in Vision2. [See test application in the [https://eiffelsoftware.origo.ethz.ch/svn/es/branches/soft-arch/Src/library/i18n/example/ SVN repository]]&lt;br /&gt;
&lt;br /&gt;
==M4: June ??? ==&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programms with translation facilities.&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3216</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3216"/>
				<updated>2006-06-06T20:19:22Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* M3: June ??? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
==Who should do the achieving?==&lt;br /&gt;
It is clear that our [[User:Carlo|Glorious Leader]] should be credited with any achieving. However he will have to delegate things somewhat, as he is is not [http://en.wikipedia.org/wiki/Aleksei_Grigorievich_Stakhanov Stakhanov].&lt;br /&gt;
We can probably divide the project into the following parts, modulo preliminary research:&lt;br /&gt;
&lt;br /&gt;
''This should be probably be completed after we have got past M1''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June ??? ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .po file&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
** find out how to use plurals (see [[Internationalization/plural_forms|plural forms]])&lt;br /&gt;
* collaborate with the [[Vision2_and_Unicode]] team&lt;br /&gt;
* Test unicode support in Vision2 ''(Ivano)''&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programms with translation facilities.&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3215</id>
		<title>Internationalization/class structure</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3215"/>
				<updated>2006-06-06T20:18:08Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Class structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Class structure ==&lt;br /&gt;
&lt;br /&gt;
That's the actual structure of the whole thing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR =&amp;gt; I18N_LOCALIZATOR =&amp;gt; I18N_TEMPLATE_FORMATTER, (I18N_DATASTRUCTURE =&amp;gt; I18N_MO_PARSER, I18N_PLURAL_FORMS)&lt;br /&gt;
::^&lt;br /&gt;
::|&lt;br /&gt;
CLASS_TO_LOCALIZE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CLASS_TO_LOCALIZE simply inherits from our SHARED_I18N_LOCALIZATOR, which only purpose is to return always the same &amp;quot;localizator: I18N_LOCALIZATOR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This class will in turn ask the archive for the translated strings and then pass it, along with all the arguments, to the template formatter, which will produce the final displayable string.&lt;br /&gt;
&lt;br /&gt;
The datastructure will use the mo_parser for the initial filling of the datastructure (proposal: do it incrementally); the plural forms resolver will be used to find out which plural form should be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All this structure is already in place; we don't know yet how to open the right file, should be implemented by an environment variable or for example with a drop-down menu in the configuration dialog?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR&lt;br /&gt;
&lt;br /&gt;
* translator: I18N_LOCALIZATOR&lt;br /&gt;
* i18n(string): STRING&lt;br /&gt;
* i18n_comp(string, args): STRING (or what you want)&lt;br /&gt;
i18n (i18n_pl) and i18n_comp (i18n_comp_pl) are interfaces to the translator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_LOCALIZATOR&lt;br /&gt;
* archive: I18N_DATASTRUCTURE&lt;br /&gt;
* ask(string): STRING (simple interface to ask the archive)&lt;br /&gt;
* solve_template(string, args): STRING (function that compose a string from template+arguments)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_DATASCTRUCTURE&lt;br /&gt;
* mo_parser: I18N_MO_PARSER&lt;br /&gt;
* load(n) (interface to the parser)&lt;br /&gt;
* translate(STRING): STRING (interface to the I18N_LOCALIZATOR)&lt;br /&gt;
* data_structure: HASH|ARRAY (where the strings are effectively stored)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_MO_PARSER&lt;br /&gt;
* open(file)&lt;br /&gt;
* load(n): STRING&lt;br /&gt;
* load_translated(n): STRING&lt;br /&gt;
* load_hash_entry(n): STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_PLURAL_FORMS (more on this [[Internationalization/plural_forms|here]])&lt;br /&gt;
* get_plural_form(n): INTEGER (interface to the datastructure)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_TEMPLATE_FORMATTER&lt;br /&gt;
* solve_template(a_template: STRING_32; a_args: TUPLE): STRING_32 (interface to the localizator)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3214</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=3214"/>
				<updated>2006-06-06T20:14:34Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* M3: June ??? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Projects]]&lt;br /&gt;
[[Category:Internationalization]]&lt;br /&gt;
[[Image:ebabylon.png|right|frame| Our Eiffel Tower of Babylon]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Many [people] would simply love seeing their computer screen showing a lot less of English, and far more of their own language.&amp;quot;'' -- gettext doc&lt;br /&gt;
&lt;br /&gt;
Our aim is not only to provide a framework to ease the translation of Eiffel-written applications, allowing the user to chose his/her preferred language at runtime, but also to let the developer access information and formats based on users' locale.&lt;br /&gt;
&lt;br /&gt;
==What is internationalisation?==&lt;br /&gt;
&lt;br /&gt;
The first thing that comes to mind is translation. But internationalisation isn't restricted to enabling translation: it includes making it possible to localise notations (time, date, numbers), measures, paper size, and much more.&lt;br /&gt;
&lt;br /&gt;
==What should we achieve?==&lt;br /&gt;
*Applications should be able to load localized strings at runtime and be provided with localized format strings (e.g date format).&lt;br /&gt;
*Developers can use tools that automagically extract strings from source code and can try to get them translated in a file to distribute along with the application.&lt;br /&gt;
*Users will still be unhappy and get depressed ''but in their own language'', which we can all agree is a significant step forward.&lt;br /&gt;
&lt;br /&gt;
==Who should do the achieving?==&lt;br /&gt;
It is clear that our [[User:Carlo|Glorious Leader]] should be credited with any achieving. However he will have to delegate things somewhat, as he is is not [http://en.wikipedia.org/wiki/Aleksei_Grigorievich_Stakhanov Stakhanov].&lt;br /&gt;
We can probably divide the project into the following parts, modulo preliminary research:&lt;br /&gt;
&lt;br /&gt;
''This should be probably be completed after we have got past M1''&lt;br /&gt;
&lt;br /&gt;
=Milestones=&lt;br /&gt;
&lt;br /&gt;
==M2: May 5 ==&lt;br /&gt;
* [[Internationalization/feasibility|feasibility]]: look at string classes (unicode and not) and how strings are used in EiffelStudio (creation, composition) ''(Ivano, Carlo, Leo, Hong)''&lt;br /&gt;
* [[Internationalization/file_format|file format]]: compare existing file formats for dictionaries ''(Etienne, Andreas)''&lt;br /&gt;
* [[Internationalization/tool_evaluation|tool evaluation]]: list and compare existing translation tools ''(Christian, Martino)''&lt;br /&gt;
&lt;br /&gt;
==M3: June ??? ==&lt;br /&gt;
* write an initial .po to start translating and have a .mo for testing ''(Leo, Carlo)''&lt;br /&gt;
* [[Internationalization/mo parser|mo parser]]: extract translated strings from .mo files ''([[User:etienner|Etienne]], [[User:Trosim|Martino]])''&lt;br /&gt;
* [[Internationalization/code_parser|code parser]]: extract strings to be translated from source code and generate .po file&lt;br /&gt;
* [[Internationalization/translation function|translation function]]: map hard-coded strings to translated strings ''(Martino)''&lt;br /&gt;
** find a solution with templates&lt;br /&gt;
** globality: how to implement, the object should be shared between all modules (see [[Internationalization/class_structure|class structure]])&lt;br /&gt;
* collaborate with the [[Vision2_and_Unicode]] team&lt;br /&gt;
* Test unicode support in Vision2 ''(Ivano)''&lt;br /&gt;
* compile a [[Internationalization/features list|list of basic features]] to provide (e.g. date/time format, system locale) ''[deferred]''&lt;br /&gt;
&lt;br /&gt;
= Possible future developments =&lt;br /&gt;
&lt;br /&gt;
* collaborate with the [[ESWizard]] team. Create wizards for programms with translation facilities.&lt;br /&gt;
&lt;br /&gt;
=Relevant Links=&lt;br /&gt;
[http://www.debian.org/doc/manuals/intro-i18n/ Introduction to i18n]&lt;br /&gt;
&lt;br /&gt;
==What other people have done==&lt;br /&gt;
[http://doc.trolltech.com/4.1/i18n.html internationalisation with QT]&lt;br /&gt;
&lt;br /&gt;
[http://oss.erdfunkstelle.de/kde-i18n/tiki-index.php?page=miniHowtoGui howto for internationalisation of KDE programs ]&lt;br /&gt;
&lt;br /&gt;
[http://l10n.kde.org/docs/translation-howto/ another KDE howto (doesn't Gnome do any internationalisation?)]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
Everyone interested in this project is welcome to [http://origo.ethz.ch/cgi-bin/mailman/listinfo/es-i18n join our mailinglist] es-i18n@origo.ethz.ch&lt;br /&gt;
&lt;br /&gt;
* Project Leader: [[User:Carlo|Carlo Vanini]]&lt;br /&gt;
* [[User:leo| Leo Fellmann]]&lt;br /&gt;
* [[User:kiwi| Ivano Somaini]]&lt;br /&gt;
* [[User:murbi|Andreas Murbach]]&lt;br /&gt;
* [[User:etienner|Etienne Reichenbach]]&lt;br /&gt;
* [[User:hong |Hong Zhang]]&lt;br /&gt;
* [[User:cconti | Christian Conti]]&lt;br /&gt;
* [[User:Trosim |Martino Trosi]]&lt;br /&gt;
* [[User:Schoelle| Bernd Schoeller]]&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3210</id>
		<title>Internationalization/class structure</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3210"/>
				<updated>2006-06-06T14:11:49Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Class structure ==&lt;br /&gt;
&lt;br /&gt;
That's the actual structure of the whole thing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR =&amp;gt; I18N_LOCALIZATOR =&amp;gt; I18N_TEMPLATE_FORMATTER, (I18N_DATASTRUCTURE =&amp;gt; I18N_MO_PARSER, I18N_PLURAL_FORMS)&lt;br /&gt;
::^&lt;br /&gt;
::|&lt;br /&gt;
CLASS_TO_LOCALIZE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CLASS_TO_LOCALIZE simply inherits from our SHARED_I18N_LOCALIZATOR, which only purpose is to return always the same &amp;quot;localizator: I18N_LOCALIZATOR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This class will in turn ask the archive for the translated strings and then pass it, along with all the arguments, to the template formatter, which will produce the final displayable string.&lt;br /&gt;
&lt;br /&gt;
The datastructure will use the mo_parser for the initial filling of the datastructure (proposal: do it incrementally); the plural forms resolver will be used to find out which plural form should be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All this structure is already in place; we don't know yet how to open the right file, should be implemented by an environment variable or for example with a drop-down menu in the configuration dialog?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR&lt;br /&gt;
&lt;br /&gt;
* translator: I18N_LOCALIZATOR&lt;br /&gt;
* i18n(string): STRING&lt;br /&gt;
* i18n_comp(string, args): STRING (or what you want)&lt;br /&gt;
i18n (i18n_pl) and i18n_comp (i18n_comp_pl) are interfaces to the translator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_LOCALIZATOR&lt;br /&gt;
* archive: I18N_DATASTRUCTURE&lt;br /&gt;
* ask(string): STRING (simple interface to ask the archive)&lt;br /&gt;
* solve_template(string, args): STRING (function that compose a string from template+arguments)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_DATASCTRUCTURE&lt;br /&gt;
* mo_parser: I18N_MO_PARSER&lt;br /&gt;
* load(n) (interface to the parser)&lt;br /&gt;
* translate(STRING): STRING (interface to the I18N_LOCALIZATOR)&lt;br /&gt;
* data_structure: HASH|ARRAY (where the strings are effectively stored)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_MO_PARSER&lt;br /&gt;
* open(file)&lt;br /&gt;
* load(n): STRING&lt;br /&gt;
* load_translated(n): STRING&lt;br /&gt;
* load_hash_entry(n): STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_PLURAL_FORMS&lt;br /&gt;
* get_plural_form(n): INTEGER (interface to the datastructure)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_TEMPLATE_FORMATTER&lt;br /&gt;
* solve_template(a_template: STRING_32; a_args: TUPLE): STRING_32 (interface to the localizator)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3209</id>
		<title>Internationalization/class structure</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3209"/>
				<updated>2006-06-06T14:11:08Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* Class structure */ Added template formatter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Class structure ==&lt;br /&gt;
&lt;br /&gt;
That's the actual structure of the whole thing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR =&amp;gt; I18N_LOCALIZATOR =&amp;gt; I18N_TEMPLATE_FORMATTER, (I18N_DATASTRUCTURE =&amp;gt; I18N_MO_PARSER, I18N_PLURAL_FORMS)&lt;br /&gt;
::^&lt;br /&gt;
::|&lt;br /&gt;
CLASS_TO_LOCALIZE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CLASS_TO_LOCALIZE simply inherits from our SHARED_I18N_LOCALIZATOR, which only purpose is to return always the same &amp;quot;localizator: I18N_LOCALIZATOR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This class will in turn ask the archive for the translated strings and then pass it, along with all the arguments, to the template formatter, which will produce the final displayable string.&lt;br /&gt;
&lt;br /&gt;
The datastructure will use the mo_parser for the initial filling of the datastructure (proposal: do it incrementally); the plural forms resolver will be used to find out which plural form should be used.&lt;br /&gt;
&lt;br /&gt;
All this structure is already in place; we don't know yet how to open the right file, should be implemented by an environment variable or for example with a drop-down menu in the configuration dialog?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR&lt;br /&gt;
&lt;br /&gt;
* translator: I18N_LOCALIZATOR&lt;br /&gt;
* i18n(string): STRING&lt;br /&gt;
* i18n_comp(string, args): STRING (or what you want)&lt;br /&gt;
i18n (i18n_pl) and i18n_comp (i18n_comp_pl) are interfaces to the translator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_LOCALIZATOR&lt;br /&gt;
* archive: I18N_DATASTRUCTURE&lt;br /&gt;
* ask(string): STRING (simple interface to ask the archive)&lt;br /&gt;
* solve_template(string, args): STRING (function that compose a string from template+arguments)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_DATASCTRUCTURE&lt;br /&gt;
* mo_parser: I18N_MO_PARSER&lt;br /&gt;
* load(n) (interface to the parser)&lt;br /&gt;
* translate(STRING): STRING (interface to the I18N_LOCALIZATOR)&lt;br /&gt;
* data_structure: HASH|ARRAY (where the strings are effectively stored)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_MO_PARSER&lt;br /&gt;
* open(file)&lt;br /&gt;
* load(n): STRING&lt;br /&gt;
* load_translated(n): STRING&lt;br /&gt;
* load_hash_entry(n): STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_PLURAL_FORMS&lt;br /&gt;
* get_plural_form(n): INTEGER (interface to the datastructure)&lt;br /&gt;
&lt;br /&gt;
I18N_TEMPLATE_FORMATTER&lt;br /&gt;
* solve_template(a_template: STRING_32; a_args: TUPLE): STRING_32 (interface to the localizator)&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3206</id>
		<title>Internationalization/translation function</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3206"/>
				<updated>2006-06-06T13:38:36Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: /* An example */ Fixes escape character&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The problem for the translation is that we need a way to translate three different types of string:&lt;br /&gt;
&lt;br /&gt;
* normal strings&lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A normal string&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* composed string &lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A string composed by &amp;quot; + count.out + &amp;quot; strings, like this or &amp;quot; + a_string + &amp;quot;%N&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* strings with plural form&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
 if n = 1 then&lt;br /&gt;
     Result := &amp;quot;a string&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
     Result := &amp;quot;strings&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another problem is that not all languages have the same rules for plural forms, see below and [[internationalization/plural_forms|here]] for more details.&lt;br /&gt;
&lt;br /&gt;
==Possible solution==&lt;br /&gt;
&lt;br /&gt;
I [[Talk:Internationalization/translation_function|'''propose''']] a solution, with four functions (I've got little fantasy for the function names):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n(a_string: STRING_GENERAL): STRING_32&lt;br /&gt;
    -- Function for the translation of normal strings&lt;br /&gt;
&lt;br /&gt;
i18n_pl(strings: TUPLE[STRING_GENERAL]; form: INTEGER): STRING_32&lt;br /&gt;
    -- Function for the translation of normal strings&lt;br /&gt;
    -- with plural form&lt;br /&gt;
&lt;br /&gt;
i18n_comp(a_string: STRING_GENERAL; args: TUPLE): STRING_32&lt;br /&gt;
    -- Function for the translation of composit strings&lt;br /&gt;
&lt;br /&gt;
i18n_comp_pl(strings: TUPLE[STRING_GENERAL]; args: TUPLE; form: INTEGER): STRING_32&lt;br /&gt;
    -- Function for the translation of composit&lt;br /&gt;
    -- strings with plural forms&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this solution, the programmer should write composit strings as (or in a similar way) he would do for the C ''printf'' function. The composit string above would be something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N] i18n_comp(&amp;quot;A string composed by \1 strings, like this or \2%N&amp;quot;, [count, a_string])&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where ''\1'' is the place where the first string in the argument tuple (here ''count'') has to go. I've [[Talk:Internationalization/translation_function|'''choosen''']] that the items in the argument tuple are of type ANY, to insert them in the string we have to apply the functon ''out'' to all items.&lt;br /&gt;
&lt;br /&gt;
===An example===&lt;br /&gt;
&lt;br /&gt;
A complete example of how it could work.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Piece of code without internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
if n = 1&lt;br /&gt;
io.put_string(&amp;quot;Remove file &amp;quot; + file_name.out + &amp;quot;?%N&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
io.put_string (&amp;quot;Delete following files?&amp;quot; + list.out + &amp;quot; there are &amp;quot;&lt;br /&gt;
                + list.count.out + &amp;quot;files%N&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Piece of code with internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file \1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], n))&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the content of the PO file would be:&lt;br /&gt;
&lt;br /&gt;
 #: A comment&lt;br /&gt;
 msgid &amp;quot;Remove file \1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file \1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? \2 ce ne sono \3%N&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You might ask yourself, ''why a function for all the pluralforms''?&lt;br /&gt;
&lt;br /&gt;
The number of plural forms differ between languages. This is somewhat surprising for those who only have experiences with Romanic and Germanic languages since here the number is the same (there are two). &lt;br /&gt;
But other language families have only one form or many forms. For example,&lt;br /&gt;
&lt;br /&gt;
In Polish the translation of file is plik, and the plural forms are: &lt;br /&gt;
 &lt;br /&gt;
:2,3,4 pliki&lt;br /&gt;
:5-21 pliko'w&lt;br /&gt;
:22-24 pliki&lt;br /&gt;
:25-31 pliko'w&lt;br /&gt;
:and so on...&lt;br /&gt;
&lt;br /&gt;
for more information about this topic go [http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC150 here]&lt;br /&gt;
&lt;br /&gt;
==Additional things==&lt;br /&gt;
&lt;br /&gt;
A nice thing we could do, when parsing the source code of a program to internationalize, is to recognize comments about the string.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file \1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], list_count))&lt;br /&gt;
-- A comment of the author&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would then look like this in the PO file:&lt;br /&gt;
&lt;br /&gt;
 #. A comment of the author&lt;br /&gt;
 #. Function name, class name, file path&lt;br /&gt;
 #. \1 = file_name&lt;br /&gt;
 #. \2 = list&lt;br /&gt;
 #. \3 = list_count&lt;br /&gt;
 msgid &amp;quot;Remove file \1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file \1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? \2 ce ne sono \3%N&amp;quot;&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3205</id>
		<title>Internationalization/translation function</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3205"/>
				<updated>2006-06-06T13:37:40Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Changed argument and return types, proposed escape character&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The problem for the translation is that we need a way to translate three different types of string:&lt;br /&gt;
&lt;br /&gt;
* normal strings&lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A normal string&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* composed string &lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A string composed by &amp;quot; + count.out + &amp;quot; strings, like this or &amp;quot; + a_string + &amp;quot;%N&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* strings with plural form&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
 if n = 1 then&lt;br /&gt;
     Result := &amp;quot;a string&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
     Result := &amp;quot;strings&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another problem is that not all languages have the same rules for plural forms, see below and [[internationalization/plural_forms|here]] for more details.&lt;br /&gt;
&lt;br /&gt;
==Possible solution==&lt;br /&gt;
&lt;br /&gt;
I [[Talk:Internationalization/translation_function|'''propose''']] a solution, with four functions (I've got little fantasy for the function names):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n(a_string: STRING_GENERAL): STRING_32&lt;br /&gt;
    -- Function for the translation of normal strings&lt;br /&gt;
&lt;br /&gt;
i18n_pl(strings: TUPLE[STRING_GENERAL]; form: INTEGER): STRING_32&lt;br /&gt;
    -- Function for the translation of normal strings&lt;br /&gt;
    -- with plural form&lt;br /&gt;
&lt;br /&gt;
i18n_comp(a_string: STRING_GENERAL; args: TUPLE): STRING_32&lt;br /&gt;
    -- Function for the translation of composit strings&lt;br /&gt;
&lt;br /&gt;
i18n_comp_pl(strings: TUPLE[STRING_GENERAL]; args: TUPLE; form: INTEGER): STRING_32&lt;br /&gt;
    -- Function for the translation of composit&lt;br /&gt;
    -- strings with plural forms&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this solution, the programmer should write composit strings as (or in a similar way) he would do for the C ''printf'' function. The composit string above would be something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N] i18n_comp(&amp;quot;A string composed by \1 strings, like this or \2%N&amp;quot;, [count, a_string])&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where ''\1'' is the place where the first string in the argument tuple (here ''count'') has to go. I've [[Talk:Internationalization/translation_function|'''choosen''']] that the items in the argument tuple are of type ANY, to insert them in the string we have to apply the functon ''out'' to all items.&lt;br /&gt;
&lt;br /&gt;
===An example===&lt;br /&gt;
&lt;br /&gt;
A complete example of how it could work.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Piece of code without internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
if n = 1&lt;br /&gt;
io.put_string(&amp;quot;Remove file &amp;quot; + file_name.out + &amp;quot;?%N&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
io.put_string (&amp;quot;Delete following files?&amp;quot; + list.out + &amp;quot; there are &amp;quot;&lt;br /&gt;
                + list.count.out + &amp;quot;files%N&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Piece of code with internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file \1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], n))&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the content of the PO file would be:&lt;br /&gt;
&lt;br /&gt;
 #: A comment&lt;br /&gt;
 msgid &amp;quot;Remove file \1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file %a1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? \2 ce ne sono \3%N&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You might ask yourself, ''why a function for all the pluralforms''?&lt;br /&gt;
&lt;br /&gt;
The number of plural forms differ between languages. This is somewhat surprising for those who only have experiences with Romanic and Germanic languages since here the number is the same (there are two). &lt;br /&gt;
But other language families have only one form or many forms. For example,&lt;br /&gt;
&lt;br /&gt;
In Polish the translation of file is plik, and the plural forms are: &lt;br /&gt;
 &lt;br /&gt;
:2,3,4 pliki&lt;br /&gt;
:5-21 pliko'w&lt;br /&gt;
:22-24 pliki&lt;br /&gt;
:25-31 pliko'w&lt;br /&gt;
:and so on...&lt;br /&gt;
&lt;br /&gt;
for more information about this topic go [http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC150 here]&lt;br /&gt;
&lt;br /&gt;
==Additional things==&lt;br /&gt;
&lt;br /&gt;
A nice thing we could do, when parsing the source code of a program to internationalize, is to recognize comments about the string.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file \1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], list_count))&lt;br /&gt;
-- A comment of the author&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would then look like this in the PO file:&lt;br /&gt;
&lt;br /&gt;
 #. A comment of the author&lt;br /&gt;
 #. Function name, class name, file path&lt;br /&gt;
 #. \1 = file_name&lt;br /&gt;
 #. \2 = list&lt;br /&gt;
 #. \3 = list_count&lt;br /&gt;
 msgid &amp;quot;Remove file \1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? \2 there are \3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file \1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? \2 ce ne sono \3%N&amp;quot;&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3204</id>
		<title>Internationalization/translation function</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/translation_function&amp;diff=3204"/>
				<updated>2006-06-06T13:33:55Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: Cosmetics&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The problem for the translation is that we need a way to translate three different types of string:&lt;br /&gt;
&lt;br /&gt;
* normal strings&lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A normal string&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* composed string &lt;br /&gt;
 &amp;lt;code&amp;gt;[eiffel,N] &amp;quot;A string composed by &amp;quot; + count.out + &amp;quot; strings, like this or &amp;quot; + a_string + &amp;quot;%N&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* strings with plural form&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
 if n = 1 then&lt;br /&gt;
     Result := &amp;quot;a string&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
     Result := &amp;quot;strings&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another problem is that not all languages have the same rules for plural forms, see below and [[internationalization/plural_forms|here]] for more details.&lt;br /&gt;
&lt;br /&gt;
==Possible solution==&lt;br /&gt;
&lt;br /&gt;
I [[Talk:Internationalization/translation_function|'''propose''']] a solution, with four functions (I've got little fantasy for the function names):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
i18n(a_string: STRING): STRING&lt;br /&gt;
    --Function for the translation of normal strings&lt;br /&gt;
&lt;br /&gt;
i18n_pl(strings: TUPLE[STRING]; form: INTEGER): STRING&lt;br /&gt;
    --Function for the translation of normal strings&lt;br /&gt;
    -- with plural form&lt;br /&gt;
&lt;br /&gt;
i18n_comp(a_string: STRING; args: TUPLE): STRING&lt;br /&gt;
    --Function for the translation of composit strings&lt;br /&gt;
&lt;br /&gt;
i18n_comp_pl(strings: TUPLE[STRING]; args: TUPLE; form: INTEGER): STRING&lt;br /&gt;
    --Function for the translation of composit&lt;br /&gt;
    -- strings with plural forms&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this solution, the programmer should write composit strings as (or in a similar way) he would do for the C ''printf'' function. The composit string above would be something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N] i18n_comp(&amp;quot;A string composed by %a1 strings, like this or %a2%N&amp;quot;, [count, a_string])&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where ''%a1'' is the place where the first string in the argument tuple (here ''count'') has to go. I've [[Talk:Internationalization/translation_function|'''choosen''']] that the items in the argument tuple are of type ANY, to insert them in the string we have to apply the functon ''out'' to all items.&lt;br /&gt;
&lt;br /&gt;
===An example===&lt;br /&gt;
&lt;br /&gt;
A complete example of how it could work.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Piece of code without internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
if n = 1&lt;br /&gt;
io.put_string(&amp;quot;Remove file &amp;quot; + file_name.out + &amp;quot;?%N&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
io.put_string (&amp;quot;Delete following files?&amp;quot; + list.out + &amp;quot; there are &amp;quot;&lt;br /&gt;
                + list.count.out + &amp;quot;files%N&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Piece of code with internationalization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file %a1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? %a2 there are %a3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], n))&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the content of the PO file would be:&lt;br /&gt;
&lt;br /&gt;
 #: A comment&lt;br /&gt;
 msgid &amp;quot;Remove file %a1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? %a2 there are %a3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file %a1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? %a2 ce ne sono %a3%N&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You might ask yourself, ''why a function for all the pluralforms''?&lt;br /&gt;
&lt;br /&gt;
The number of plural forms differ between languages. This is somewhat surprising for those who only have experiences with Romanic and Germanic languages since here the number is the same (there are two). &lt;br /&gt;
But other language families have only one form or many forms. For example,&lt;br /&gt;
&lt;br /&gt;
In Polish the translation of file is plik, and the plural forms are: &lt;br /&gt;
 &lt;br /&gt;
:2,3,4 pliki&lt;br /&gt;
:5-21 pliko'w&lt;br /&gt;
:22-24 pliki&lt;br /&gt;
:25-31 pliko'w&lt;br /&gt;
:and so on...&lt;br /&gt;
&lt;br /&gt;
for more information about this topic go [http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC150 here]&lt;br /&gt;
&lt;br /&gt;
==Additional things==&lt;br /&gt;
&lt;br /&gt;
A nice thing we could do, when parsing the source code of a program to internationalize, is to recognize comments about the string.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
io.put_string(i18n_comp_pl([&amp;quot;Remove file %a1?%N&amp;quot;,&lt;br /&gt;
                &amp;quot;Delete following files? %a2 there are %a3 files%N&amp;quot;],&lt;br /&gt;
                [file_name, list, list_count], list_count))&lt;br /&gt;
-- A comment of the author&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would then look like this in the PO file:&lt;br /&gt;
&lt;br /&gt;
 #. A comment of the author&lt;br /&gt;
 #. Function name, class name, file path&lt;br /&gt;
 #. %a1 = file_name&lt;br /&gt;
 #. %a2 = list&lt;br /&gt;
 #. %a3 = list_count&lt;br /&gt;
 msgid &amp;quot;Remove file %a1?%N&amp;quot;&lt;br /&gt;
 msgid_plural &amp;quot;Delete following files? %a2 there are %a3 files%N&amp;quot;&lt;br /&gt;
 msgstr[0] &amp;quot;Rimuovere il file %a1?&amp;quot;&lt;br /&gt;
 msgstr[1] &amp;quot;Cancellare i seguenti file? %a2 ce ne sono %a3%N&amp;quot;&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3164</id>
		<title>Internationalization/class structure</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3164"/>
				<updated>2006-06-03T17:01:53Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Class structure ==&lt;br /&gt;
&lt;br /&gt;
That's a possible structure of the whole thing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR =&amp;gt; I18N_LOCALIZATOR =&amp;gt; I18N_DATASTRUCTURE =&amp;gt; I18N_MO_PARSER, I18N_PLURAL_FORMS&lt;br /&gt;
::^&lt;br /&gt;
::|&lt;br /&gt;
CLASS_TO_LOCALIZE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CLASS_TO_LOCALIZE simply inherits from our SHARED_I18N_LOCALIZATOR, which only purpose is to return always the same &amp;quot;localizator: I18N_LOCALIZATOR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This class will in turn ask the archive for the translated strings, and at the end the mo_parser will be used if the string is not already in memory (actually for the initial filling of the datastructure); the plural forms resolver will be used to find out which plural form should be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR (already in place)&lt;br /&gt;
&lt;br /&gt;
* translator: I18N_LOCALIZATOR&lt;br /&gt;
* i18n(string): STRING&lt;br /&gt;
* i18n_comp(string, args): STRING (or what you want)&lt;br /&gt;
i18n (i18n_pl) and i18n_comp (i18n_comp_pl) are interfaces to the translator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_LOCALIZATOR (skeleton already in place)&lt;br /&gt;
* archive: I18N_DATASTRUCTURE&lt;br /&gt;
* ask(string): STRING (simple interface to ask the archive)&lt;br /&gt;
* solve_template(string, args): STRING (function that compose a string from template+arguments)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_DATASCTRUCTURE (already in place)&lt;br /&gt;
* mo_parser: I18N_MO_PARSER&lt;br /&gt;
* load(n) (interface to the parser)&lt;br /&gt;
* translate(STRING): STRING (interface to the I18N_LOCALIZATOR)&lt;br /&gt;
* data_structure: HASH|ARRAY (where the strings are effectively stored)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_MO_PARSER (already in place)&lt;br /&gt;
* open(file)&lt;br /&gt;
* load(n): STRING&lt;br /&gt;
* load_translated(n): STRING&lt;br /&gt;
* load_hash_entry(n): STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_PLURAL_FORMS (already in place)&lt;br /&gt;
* get_plural_form(n): INTEGER&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3159</id>
		<title>Internationalization/class structure</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization/class_structure&amp;diff=3159"/>
				<updated>2006-06-03T09:44:08Z</updated>
		
		<summary type="html">&lt;p&gt;Trosim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
== Class structure ==&lt;br /&gt;
&lt;br /&gt;
That's a possible structure of the whole thing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR =&amp;gt; I18N_LOCALIZATOR =&amp;gt; I18N_DATASTRUCTURE =&amp;gt; I18N_MO_PARSER, I18N_PLURAL_FORMS&lt;br /&gt;
::^&lt;br /&gt;
::|&lt;br /&gt;
CLASS_TO_LOCALIZE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The CLASS_TO_LOCALIZE simply inherits from our SHARED_I18N_LOCALIZATOR, which only purpose is to return always the same &amp;quot;localizator: I18N_LOCALIZATOR&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This class will in turn ask the archive for the translated strings, and at the end the mo_parser will be used if the string is not already in memory (actually for the initial filling of the datastructure); the plural forms resolver will be used to find out which plural form should be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHARED_I18N_LOCALIZATOR (already in place)&lt;br /&gt;
&lt;br /&gt;
* translator: I18N_LOCALIZATOR&lt;br /&gt;
* t(string): STRING&lt;br /&gt;
* tn(string, args): STRING (or what you want)&lt;br /&gt;
&lt;br /&gt;
t and tn are interfaces to the translator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_LOCALIZATOR (skeleton already in place)&lt;br /&gt;
* archive: I18N_DATASTRUCTURE&lt;br /&gt;
* ask(string): STRING (simple interface to ask the archive)&lt;br /&gt;
* solve_template(string, args): STRING (function that compose a string from template+arguments)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_DATASCTRUCTURE (already in place)&lt;br /&gt;
* mo_parser: I18N_MO_PARSER&lt;br /&gt;
* load(n) (interface to the parser)&lt;br /&gt;
* translate(STRING): STRING (interface to the I18N_LOCALIZATOR)&lt;br /&gt;
* data_structure: HASH|ARRAY (where the strings are effectively stored)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_MO_PARSER (already in place)&lt;br /&gt;
* open(file)&lt;br /&gt;
* load(n): STRING&lt;br /&gt;
* load_translated(n): STRING&lt;br /&gt;
* load_hash_entry(n): STRING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I18N_PLURAL_FORMS (already in place)&lt;br /&gt;
* get_plural_form(n): INTEGER&lt;/div&gt;</summary>
		<author><name>Trosim</name></author>	</entry>

	</feed>