<?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=Mingmei</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=Mingmei"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/Special:Contributions/Mingmei"/>
		<updated>2026-04-26T14:54:14Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4500</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=4500"/>
				<updated>2006-09-07T12:14:28Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
My Summary is based on article by Michael Becker (see [http://www.ijon.de/comp/tutorials/locale.html here]).This summary is more or less concerning SuSE-Linux.&lt;br /&gt;
&lt;br /&gt;
There are differences between User-locale and C-locale. C-locale, is the local, which is only effective in C-environment. If there are no locales  set in user environment, then C-locale is effective, which is so called &amp;quot;POSIX&amp;quot;-locale.&lt;br /&gt;
&lt;br /&gt;
With C-command &amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt; one set C-locale with User-locale. So one could retrieve details about User-locale information with C-functions.&lt;br /&gt;
&lt;br /&gt;
==Listing available locales==&lt;br /&gt;
There are two directories that one could get information about locales. &lt;br /&gt;
They are:&lt;br /&gt;
''/usr/share/locale/''&lt;br /&gt;
''/usr/share/i18n/''&lt;br /&gt;
&lt;br /&gt;
In the first directory, the locales are binary files. So we could not need them for our purpose since i do not know how to read them for the moment.&lt;br /&gt;
&lt;br /&gt;
In the second directory there are at least 2 subdirectories, with names charmaps and locales.&lt;br /&gt;
&lt;br /&gt;
Shell command ''ls /usr/share/i18n/locales/'' list all the available locales.&lt;br /&gt;
&lt;br /&gt;
==Checking for default locale==&lt;br /&gt;
&lt;br /&gt;
With shell command &amp;quot;locale&amp;quot; one can get infomation about default locale. &lt;br /&gt;
In C, to get details of localeone can use&lt;br /&gt;
&amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&lt;br /&gt;
localeconv()&amp;lt;/code&amp;gt;  &lt;br /&gt;
see ''manpage locale(7)'' to get more information.&lt;br /&gt;
&lt;br /&gt;
Another way to obtain the current locale is to use the environnement variable ''LANGUAGE'', this is done with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
environement : EXECUTION_ENVIRONMENT&lt;br /&gt;
...&lt;br /&gt;
environement.get (&amp;quot;LANGUAGE&amp;quot;)&lt;br /&gt;
    -- returns the (rank)list (as string) of languages set by the user&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
C-command &amp;lt;code&amp;gt; nl_langinfo() &amp;lt;/code&amp;gt;(defined in langinfo.h) one could get information about all categories.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===1. LC_NUMERIC ===&lt;br /&gt;
&lt;br /&gt;
Comparing LC_NUMERIC formats in posix,en_US, de_DE,zh_CN&lt;br /&gt;
1.C-codes and their outputs:&lt;br /&gt;
====posix====&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12345678 123456.780000 123456.780000 12:34&lt;br /&gt;
====en_US====&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
#include &amp;lt;locale.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;en_US&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,4,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:04&lt;br /&gt;
====de_DE====&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;de_DE&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12.345.678 123456,780000 123.456,780000 12:34&lt;br /&gt;
====zh_CN====&lt;br /&gt;
setlocale(LC_NUMERIC,&amp;quot;zh_CN&amp;quot;); only change to above code&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:34&lt;br /&gt;
===Analysing results===&lt;br /&gt;
Look at all the locale source files, the results are resonable to us.&lt;br /&gt;
&lt;br /&gt;
Feld           &lt;br /&gt;
Posix&lt;br /&gt;
en_US&lt;br /&gt;
de_DE&lt;br /&gt;
zh_CN&lt;br /&gt;
decimal_point&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
thousands_sep&lt;br /&gt;
&amp;quot;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
grouping&lt;br /&gt;
-1&lt;br /&gt;
3;3&lt;br /&gt;
3;3&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;&amp;lt;U002E&amp;gt;&amp;quot; means &amp;quot;dot&amp;quot;; &amp;quot;&amp;lt;U002C&amp;gt;&amp;quot; means &amp;quot;comma&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===2.LC_TIME===&lt;br /&gt;
For this purpose there is a C-function &amp;lt;code&amp;gt; nl_langinfo() &amp;lt;/code&amp;gt; (defined in langinfo.h).&lt;br /&gt;
Here is a list of arguments for this function, which are useful for our project:&lt;br /&gt;
*ABDAY_x : abbreviated name of weekday x, %a-Descriptor&lt;br /&gt;
*DAY_x : name of day x,%A-Descriptor&lt;br /&gt;
*ABMON_x : abbreviated name of month x, %b-Descriptor&lt;br /&gt;
*MON_x : name of month x,%B-Descriptor&lt;br /&gt;
*[AM|PM]_STR:  strings which can be used in the representation of time as an hour from 1 to 12 plus an am/pm specifier.&lt;br /&gt;
*D_T_FMT:  time and date pattern in a locale-specific way.&lt;br /&gt;
*D_FMT: date pattern: date pattern in a locale-specific way.&lt;br /&gt;
*T_FMT: time pattern in a locale-specific way. &lt;br /&gt;
&lt;br /&gt;
The result of nl_langinfo, called with one of the last three arguments, can than be used as argument for the C-function &amp;lt;code&amp;gt;strftime()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, with &amp;lt;code&amp;gt; nl_langinfo(D_T_FMT)&amp;lt;/code&amp;gt;, one get a pointer at a string, which in form of %a %d %b %Y %T %Z.&lt;br /&gt;
where:&lt;br /&gt;
%a: The abbreviated weekday name according to the current locale&lt;br /&gt;
%d: The day of the month as a decimal number (range 01 to 31)&lt;br /&gt;
%b: The abbreviated month name according to the current locale&lt;br /&gt;
%Y: The year as a decimal number including the century.&lt;br /&gt;
%T: The time in 24-hour notation (%H:%M:%S)&lt;br /&gt;
%Z: The time zone or name or abbreviation&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
Using a parser one could also retrieve locale information,  about which I do not have a lot of idea.&lt;br /&gt;
&lt;br /&gt;
Still there are C-functions to use categories. &lt;br /&gt;
For example,&lt;br /&gt;
&amp;lt;code&amp;gt;strftime()&lt;br /&gt;
strptime()&lt;br /&gt;
wcsftime()&amp;lt;/code&amp;gt;&lt;br /&gt;
for LC_TIME&lt;br /&gt;
For another example,&lt;br /&gt;
&amp;lt;code&amp;gt;isalnum&lt;br /&gt;
isalpha&lt;br /&gt;
isblank&amp;lt;/code&amp;gt;&lt;br /&gt;
and so on for LC_CTYPE. &lt;br /&gt;
&lt;br /&gt;
For more information please read [http://www.opengroup.org/onlinepubs/007908799/xbd/locale.html local-Specification of Unix Open]. &lt;br /&gt;
Another paper auf dem Linux Kongress 1995 in Berlin from Jochen Hein is also useful, see [http://www.jochen.org/vortraege/nls-1995.pdf National Language Support]&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4499</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=4499"/>
				<updated>2006-09-07T11:59:16Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
My Summary is based on article by Michael Becker (see [http://www.ijon.de/comp/tutorials/locale.html here]).This summary is more or less concerning SuSE-Linux.&lt;br /&gt;
&lt;br /&gt;
There are differences between User-locale and C-locale. C-locale, is the local, which is only effective in C-environment. If there are no locales  set in user environment, then C-locale is effective, which is so called &amp;quot;POSIX&amp;quot;-locale.&lt;br /&gt;
&lt;br /&gt;
With C-command &amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt; one set C-locale with User-locale. So one could retrieve details about User-locale information with C-functions.&lt;br /&gt;
&lt;br /&gt;
==Listing available locales==&lt;br /&gt;
There are two directories that one could get information about locales. &lt;br /&gt;
They are:&lt;br /&gt;
''/usr/share/locale/''&lt;br /&gt;
''/usr/share/i18n/''&lt;br /&gt;
&lt;br /&gt;
In the first directory, the locales are binary files. So we could not need them for our purpose since i do not know how to read them for the moment.&lt;br /&gt;
&lt;br /&gt;
In the second directory there are at least 2 subdirectories, with names charmaps and locales.&lt;br /&gt;
&lt;br /&gt;
Shell command ''ls /usr/share/i18n/locales/'' list all the available locales.&lt;br /&gt;
&lt;br /&gt;
==Checking for default locale==&lt;br /&gt;
&lt;br /&gt;
With shell command &amp;quot;locale&amp;quot; one can get infomation about default locale. &lt;br /&gt;
In C, to get details of localeone can use&lt;br /&gt;
&amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&lt;br /&gt;
localeconv()&amp;lt;/code&amp;gt;  &lt;br /&gt;
see ''manpage locale(7)'' to get more information.&lt;br /&gt;
&lt;br /&gt;
Another way to obtain the current locale is to use the environnement variable ''LANGUAGE'', this is done with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
environement : EXECUTION_ENVIRONMENT&lt;br /&gt;
...&lt;br /&gt;
environement.get (&amp;quot;LANGUAGE&amp;quot;)&lt;br /&gt;
    -- returns the (rank)list (as string) of languages set by the user&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
C-command &amp;lt;code&amp;gt; nl_langinfo() &amp;lt;/code&amp;gt;(defined in langinfo.h) one could get information about all categories.  &lt;br /&gt;
For example, with &amp;lt;code&amp;gt; nl_langinfo(D_T_FMT)&amp;lt;/code&amp;gt;, one get a pointer at a string, which in form of %a %d %b %Y %T %Z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LC_NUMERIC ===&lt;br /&gt;
&lt;br /&gt;
Comparing LC_NUMERIC formats in posix,en_US, de_DE,zh_CN&lt;br /&gt;
1.C-codes and their outputs:&lt;br /&gt;
====posix====&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12345678 123456.780000 123456.780000 12:34&lt;br /&gt;
====en_US====&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
#include &amp;lt;locale.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;en_US&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,4,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:04&lt;br /&gt;
====de_DE====&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;de_DE&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12.345.678 123456,780000 123.456,780000 12:34&lt;br /&gt;
====zh_CN====&lt;br /&gt;
setlocale(LC_NUMERIC,&amp;quot;zh_CN&amp;quot;); only change to above code&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:34&lt;br /&gt;
===Analysing results===&lt;br /&gt;
Look at all the locale source files, the results are resonable to us.&lt;br /&gt;
&lt;br /&gt;
Feld           &lt;br /&gt;
Posix&lt;br /&gt;
en_US&lt;br /&gt;
de_DE&lt;br /&gt;
zh_CN&lt;br /&gt;
decimal_point&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
thousands_sep&lt;br /&gt;
&amp;quot;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
grouping&lt;br /&gt;
-1&lt;br /&gt;
3;3&lt;br /&gt;
3;3&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;&amp;lt;U002E&amp;gt;&amp;quot; means &amp;quot;dot&amp;quot;; &amp;quot;&amp;lt;U002C&amp;gt;&amp;quot; means &amp;quot;comma&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
Using a parser one could also retrieve locale information,  about which I do not have a lot of idea.&lt;br /&gt;
&lt;br /&gt;
Still there are C-functions to use categories. &lt;br /&gt;
For example,&lt;br /&gt;
&amp;lt;code&amp;gt;strftime()&lt;br /&gt;
strptime()&lt;br /&gt;
wcsftime()&amp;lt;/code&amp;gt;&lt;br /&gt;
for LC_TIME&lt;br /&gt;
For another example,&lt;br /&gt;
&amp;lt;code&amp;gt;isalnum&lt;br /&gt;
isalpha&lt;br /&gt;
isblank&amp;lt;/code&amp;gt;&lt;br /&gt;
and so on for LC_CTYPE. &lt;br /&gt;
&lt;br /&gt;
For more information please read [http://www.opengroup.org/onlinepubs/007908799/xbd/locale.html local-Specification of Unix Open]. &lt;br /&gt;
Another paper auf dem Linux Kongress 1995 in Berlin from Jochen Hein is also useful, see [http://www.jochen.org/vortraege/nls-1995.pdf National Language Support]&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4498</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=4498"/>
				<updated>2006-09-07T11:51:17Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
My Summary is based on article by Michael Becker (see [http://www.ijon.de/comp/tutorials/locale.html here]).This summary is more or less concerning SuSE-Linux.&lt;br /&gt;
&lt;br /&gt;
There are differences between User-locale and C-locale. C-locale, is the local, which is only effective in C-environment. If there are no locales  set in user environment, then C-locale is effective, which is so called &amp;quot;POSIX&amp;quot;-locale.&lt;br /&gt;
&lt;br /&gt;
With C-command &amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt; one set C-locale with User-locale. So one could retrieve details about User-locale information with C-functions.&lt;br /&gt;
&lt;br /&gt;
==Listing available locales==&lt;br /&gt;
There are two directories that one could get information about locales. &lt;br /&gt;
They are:&lt;br /&gt;
''/usr/share/locale/''&lt;br /&gt;
''/usr/share/i18n/''&lt;br /&gt;
&lt;br /&gt;
In the first directory, the locales are binary files. So we could not need them for our purpose since i do not know how to read them for the moment.&lt;br /&gt;
&lt;br /&gt;
In the second directory there are at least 2 subdirectories, with names charmaps and locales.&lt;br /&gt;
&lt;br /&gt;
Shell command ''ls /usr/share/i18n/locales/'' list all the available locales.&lt;br /&gt;
&lt;br /&gt;
==Checking for default locale==&lt;br /&gt;
&lt;br /&gt;
With shell command &amp;quot;locale&amp;quot; one can get infomation about default locale. &lt;br /&gt;
In C, to get details of localeone can use&lt;br /&gt;
&amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&lt;br /&gt;
localeconv()&amp;lt;/code&amp;gt;  &lt;br /&gt;
see ''manpage locale(7)'' to get more information.&lt;br /&gt;
&lt;br /&gt;
Another way to obtain the current locale is to use the environnement variable ''LANGUAGE'', this is done with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
environement : EXECUTION_ENVIRONMENT&lt;br /&gt;
...&lt;br /&gt;
environement.get (&amp;quot;LANGUAGE&amp;quot;)&lt;br /&gt;
    -- returns the (rank)list (as string) of languages set by the user&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
C-command &amp;lt;code&amp;gt; nl_langinfo() &amp;lt;/code&amp;gt;(defined in langinfo.h) one could get information about all categories.  &lt;br /&gt;
For example, with &amp;lt;code&amp;gt; nl_langinfo(D_T_FMT)&amp;lt;/code&amp;gt;, one get a pointer at a string, which in form of %a %d %b %Y %T %Z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LC_NUMERIC ==&lt;br /&gt;
&lt;br /&gt;
Comparing LC_NUMERIC formats in posix,en_US, de_DE,zh_CN&lt;br /&gt;
1.C-codes and their outputs:&lt;br /&gt;
===posix===&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12345678 123456.780000 123456.780000 12:34&lt;br /&gt;
===en_US===&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
#include &amp;lt;locale.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;en_US&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,4,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:04&lt;br /&gt;
===de_DE===&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;de_DE&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12.345.678 123456,780000 123.456,780000 12:34&lt;br /&gt;
===zh_CN===&lt;br /&gt;
setlocale(LC_NUMERIC,&amp;quot;zh_CN&amp;quot;); only change to above code&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:34&lt;br /&gt;
===Analysing results===&lt;br /&gt;
Look at all the locale source files, the results are resonable to us.&lt;br /&gt;
&lt;br /&gt;
Feld           &lt;br /&gt;
Posix&lt;br /&gt;
en_US&lt;br /&gt;
de_DE&lt;br /&gt;
zh_CN&lt;br /&gt;
decimal_point&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
thousands_sep&lt;br /&gt;
&amp;quot;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
grouping&lt;br /&gt;
-1&lt;br /&gt;
3;3&lt;br /&gt;
3;3&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;&amp;lt;U002E&amp;gt;&amp;quot; means &amp;quot;dot&amp;quot;; &amp;quot;&amp;lt;U002C&amp;gt;&amp;quot; means &amp;quot;comma&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
Using a parser one could also retrieve locale information,  about which I do not have a lot of idea.&lt;br /&gt;
&lt;br /&gt;
Still there are C-functions to use categories. &lt;br /&gt;
For example,&lt;br /&gt;
&amp;lt;code&amp;gt;strftime()&lt;br /&gt;
strptime()&lt;br /&gt;
wcsftime()&amp;lt;/code&amp;gt;&lt;br /&gt;
for LC_TIME&lt;br /&gt;
For another example,&lt;br /&gt;
&amp;lt;code&amp;gt;isalnum&lt;br /&gt;
isalpha&lt;br /&gt;
isblank&amp;lt;/code&amp;gt;&lt;br /&gt;
and so on for LC_CTYPE. &lt;br /&gt;
&lt;br /&gt;
For more information please read [http://www.opengroup.org/onlinepubs/007908799/xbd/locale.html local-Specification of Unix Open]. &lt;br /&gt;
Another paper auf dem Linux Kongress 1995 in Berlin from Jochen Hein is also useful, see [http://www.jochen.org/vortraege/nls-1995.pdf National Language Support]&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4497</id>
		<title>User:Mingmei</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4497"/>
				<updated>2006-09-07T11:41:28Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;hello everybody!&lt;br /&gt;
&lt;br /&gt;
Now I am ready to work on this semester thesis [[internationalization|i18n]]. Last two weeks I was working as interpreter at Alstom Power. It was a lot of fun, but it was also quite stressy.&lt;br /&gt;
&lt;br /&gt;
我现在在做学期论文，论题是[[internationalization|国际化]]。上两周我在阿而斯通做技术翻译，紧张而有趣。&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4495</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=4495"/>
				<updated>2006-09-07T09:51:52Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
My Summary is based on article by Michael Becker (see [http://www.ijon.de/comp/tutorials/locale.html here]).This summary is more or less concerning SuSE-Linux.&lt;br /&gt;
&lt;br /&gt;
There are differences between User-locale and C-locale. C-locale, is the local, which is only effective in C-environment. If there are no locales  set in user environment, then C-locale is effective, which is so called &amp;quot;POSIX&amp;quot;-locale.&lt;br /&gt;
&lt;br /&gt;
With C-command &amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt; one set C-locale with User-locale. So one could retrieve details about User-locale information with C-functions.&lt;br /&gt;
&lt;br /&gt;
==Listing available locales==&lt;br /&gt;
There are two directories that one could get information about locales. &lt;br /&gt;
They are:&lt;br /&gt;
''/usr/share/locale/''&lt;br /&gt;
''/usr/share/i18n/''&lt;br /&gt;
&lt;br /&gt;
In the first directory, the locales are binary files. So we could not need them for our purpose since i do not know how to read them for the moment.&lt;br /&gt;
&lt;br /&gt;
In the second directory there are at least 2 subdirectories, with names charmaps and locales.&lt;br /&gt;
&lt;br /&gt;
Shell command ''ls /usr/share/i18n/locales/'' list all the available locales.&lt;br /&gt;
&lt;br /&gt;
==Checking for default locale==&lt;br /&gt;
&lt;br /&gt;
With shell command &amp;quot;locale&amp;quot; one can get infomation about default locale. &lt;br /&gt;
In C, to get details of localeone can use&lt;br /&gt;
&amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&lt;br /&gt;
localeconv()&amp;lt;/code&amp;gt;  &lt;br /&gt;
see ''manpage locale(7)'' to get more information.&lt;br /&gt;
&lt;br /&gt;
Another way to obtain the current locale is to use the environnement variable ''LANGUAGE'', this is done with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[eiffel,N]&lt;br /&gt;
environement : EXECUTION_ENVIRONMENT&lt;br /&gt;
...&lt;br /&gt;
environement.get (&amp;quot;LANGUAGE&amp;quot;)&lt;br /&gt;
    -- returns the (rank)list (as string) of languages set by the user&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
C-command &amp;lt;code&amp;gt; nl_langinfo() &amp;lt;/code&amp;gt;(defined in langinfo.h) one could get information about all categories.  &lt;br /&gt;
For example, with &amp;lt;code&amp;gt; nl_langinfo(D_T_FMT)&amp;lt;/code&amp;gt;, one get a pointer at a string, which in form of %a %d %b %Y %T %Z.&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
Using a parser one could also retrieve locale information,  about which I do not have a lot of idea.&lt;br /&gt;
&lt;br /&gt;
Still there are C-functions to use categories. &lt;br /&gt;
For example,&lt;br /&gt;
&amp;lt;code&amp;gt;strftime()&lt;br /&gt;
strptime()&lt;br /&gt;
wcsftime()&amp;lt;/code&amp;gt;&lt;br /&gt;
for LC_TIME&lt;br /&gt;
For another example,&lt;br /&gt;
&amp;lt;code&amp;gt;isalnum&lt;br /&gt;
isalpha&lt;br /&gt;
isblank&amp;lt;/code&amp;gt;&lt;br /&gt;
and so on for LC_CTYPE. &lt;br /&gt;
&lt;br /&gt;
For more information please read [http://www.opengroup.org/onlinepubs/007908799/xbd/locale.html local-Specification of Unix Open]. &lt;br /&gt;
Another paper auf dem Linux Kongress 1995 in Berlin from Jochen Hein is also useful, see [http://www.jochen.org/vortraege/nls-1995.pdf National Language Support]&lt;br /&gt;
&lt;br /&gt;
==Retrieving local information: LC_NUMERIC ==&lt;br /&gt;
&lt;br /&gt;
Comparing LC_NUMERIC formats in posix,en_US, de_DE,zh_CN&lt;br /&gt;
1.C-codes and their outputs:&lt;br /&gt;
===posix===&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12345678 123456.780000 123456.780000 12:34&lt;br /&gt;
===en_US===&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
#include &amp;lt;locale.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;en_US&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,4,2);&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:04&lt;br /&gt;
===de_DE===&lt;br /&gt;
int main (int arg,char** argv){&lt;br /&gt;
        setlocale(LC_NUMERIC,&amp;quot;de_DE&amp;quot;);&lt;br /&gt;
        printf(&amp;quot;%d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%'d\n&amp;quot;,12345678);&lt;br /&gt;
        printf(&amp;quot;%f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%'f\n&amp;quot;,123456.78);&lt;br /&gt;
        printf(&amp;quot;%1$d:%2$.*3$d\n&amp;quot;,12,34,2);&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
Outputs are:12345678 12.345.678 123456,780000 123.456,780000 12:34&lt;br /&gt;
===zh_CN===&lt;br /&gt;
setlocale(LC_NUMERIC,&amp;quot;zh_CN&amp;quot;); only change to above code&lt;br /&gt;
Outputs are:12345678 12,345,678 123456.780000 123,456.780000 12:34&lt;br /&gt;
===Analysing results===&lt;br /&gt;
Look at all the locale source files, the results are resonable to us.&lt;br /&gt;
&lt;br /&gt;
Feld           &lt;br /&gt;
Posix&lt;br /&gt;
en_US&lt;br /&gt;
de_DE&lt;br /&gt;
zh_CN&lt;br /&gt;
decimal_point&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
thousands_sep&lt;br /&gt;
&amp;quot;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002E&amp;gt;&amp;quot;&lt;br /&gt;
&amp;quot;&amp;lt;U002C&amp;gt;&amp;quot;&lt;br /&gt;
grouping&lt;br /&gt;
-1&lt;br /&gt;
3;3&lt;br /&gt;
3;3&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;&amp;lt;U002E&amp;gt;&amp;quot; means &amp;quot;dot&amp;quot;; &amp;quot;&amp;lt;U002C&amp;gt;&amp;quot; means &amp;quot;comma&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4452</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=4452"/>
				<updated>2006-09-04T08:45:26Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
My Summary is based on article by Michael Becker (see [http://www.ijon.de/comp/tutorials/locale.html here]).This summary is more or less concerning SuSE-Linux.&lt;br /&gt;
&lt;br /&gt;
There are differences between User-locale and C-locale. C-locale, is the local, which is only effective in C-environment. If there are no locales  set in user environment, then C-locale is effective, which is so called &amp;quot;POSIX&amp;quot;-locale.&lt;br /&gt;
&lt;br /&gt;
With C-command &amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt; one set C-locale with User-locale. So one could retrieve details about User-locale information with C-functions.&lt;br /&gt;
&lt;br /&gt;
==Listing available locales==&lt;br /&gt;
There are two directories that one could get information about locales. &lt;br /&gt;
They are:&lt;br /&gt;
''/usr/share/locale/''&lt;br /&gt;
''/usr/share/i18n/''&lt;br /&gt;
&lt;br /&gt;
In the first directory, the locales are binary files. So we could not need them for our purpose since i do not know how to read them for the moment.&lt;br /&gt;
&lt;br /&gt;
In the second directory there are at least 2 subdirectories, with names charmaps and locales.&lt;br /&gt;
&lt;br /&gt;
Shell command ''ls /usr/share/i18n/locales/'' list all the available locales.&lt;br /&gt;
&lt;br /&gt;
==Checking for default locale==&lt;br /&gt;
&lt;br /&gt;
With shell command &amp;quot;locale&amp;quot; one can get infomation about default locale. &lt;br /&gt;
In C, to get details of localeone can use&lt;br /&gt;
&amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&lt;br /&gt;
localeconv()&amp;lt;/code&amp;gt;  &lt;br /&gt;
see ''manpage locale(7)'' to get more information.&lt;br /&gt;
&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
C-command &amp;lt;code&amp;gt; nl_langinfo() &amp;lt;/code&amp;gt;(defined in langinfo.h) one could get information about all categories.  &lt;br /&gt;
For example, with &amp;lt;code&amp;gt; nl_langinfo(D_T_FMT)&amp;lt;/code&amp;gt;, one get a pointer at a string, which in form of %a %d %b %Y %T %Z.&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
Using a parser one could also retrieve locale information,  about which I do not have a lot of idea.&lt;br /&gt;
&lt;br /&gt;
Still there are C-functions to use categories. &lt;br /&gt;
For example,&lt;br /&gt;
&amp;lt;code&amp;gt;strftime()&lt;br /&gt;
strptime()&lt;br /&gt;
wcsftime()&amp;lt;/code&amp;gt;&lt;br /&gt;
for LC_TIME&lt;br /&gt;
For another example,&lt;br /&gt;
&amp;lt;code&amp;gt;isalnum&lt;br /&gt;
isalpha&lt;br /&gt;
isblank&amp;lt;/code&amp;gt;&lt;br /&gt;
and so on for LC_CTYPE. &lt;br /&gt;
&lt;br /&gt;
For more information please read [http://www.opengroup.org/onlinepubs/007908799/xbd/locale.html local-Specification of Unix Open]&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization/posix_locale&amp;diff=4449</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=4449"/>
				<updated>2006-09-03T16:31:36Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internationalization]]&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
My Summary is based on article by Michael Becker (see [http://www.ijon.de/comp/tutorials/locale.html here]).This summary is more or less concerning SuSE-Linux.&lt;br /&gt;
&lt;br /&gt;
There are differences between User-locale and C-locale. C-locale, is the local, which is only effectual in C-environment.  Outside C-environment if there is no other locale set, the C-locale is then effectual, which is called &amp;quot;POSIX&amp;quot;-locale.&lt;br /&gt;
&lt;br /&gt;
With C-command &amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt; one set C-locale with User-locale. So one could retrieve details about User-locale information with C-functions.&lt;br /&gt;
&lt;br /&gt;
==Listing available locales==&lt;br /&gt;
There are two directories that one could get information about locales. &lt;br /&gt;
They are:&lt;br /&gt;
''/usr/share/locale/''&lt;br /&gt;
''/usr/share/i18n/''&lt;br /&gt;
&lt;br /&gt;
In the first directory, the locales are binary files. So we could not need them for our purpose since i do not know how to read them for the moment.&lt;br /&gt;
&lt;br /&gt;
In the second directory there are at least 2 subdirectories, with names charmaps and locales.&lt;br /&gt;
&lt;br /&gt;
Shell command ''ls /usr/share/i18n/locales/'' list all the available locales.&lt;br /&gt;
&lt;br /&gt;
==Checking for default locale==&lt;br /&gt;
&lt;br /&gt;
With shell command &amp;quot;locale&amp;quot; one can get infomation about default locale. &lt;br /&gt;
In C, to get details of localeone can use&lt;br /&gt;
&amp;lt;code&amp;gt;setlocale (LC_ALL,&amp;quot;&amp;quot;)&lt;br /&gt;
localeconv()&amp;lt;/code&amp;gt;  &lt;br /&gt;
see ''manpage locale(7)'' to get more information.&lt;br /&gt;
&lt;br /&gt;
== Retrieving locale information ==&lt;br /&gt;
C-command &amp;lt;code&amp;gt; nl_langinfo() &amp;lt;/code&amp;gt;(defined in langinfo.h) one could get information about all categories.  &lt;br /&gt;
For example, with &amp;lt;code&amp;gt; nl_langinfo(D_T_FMT)&amp;lt;/code&amp;gt;, one get a pointer at a string, which in form of %a %d %b %Y %T %Z.&lt;br /&gt;
&lt;br /&gt;
== Other information ==&lt;br /&gt;
Using a parser one could also retrieve locale information,  about which I do not have a lot of idea.&lt;br /&gt;
&lt;br /&gt;
Still there are C-functions to use categories. &lt;br /&gt;
For example,&lt;br /&gt;
&amp;lt;code&amp;gt;strftime()&lt;br /&gt;
strptime()&lt;br /&gt;
wcsftime()&amp;lt;/code&amp;gt;&lt;br /&gt;
for LC_TIME&lt;br /&gt;
For another example,&lt;br /&gt;
&amp;lt;code&amp;gt;isalnum&lt;br /&gt;
isalpha&lt;br /&gt;
isblank&amp;lt;/code&amp;gt;&lt;br /&gt;
and so on for LC_CTYPE. &lt;br /&gt;
&lt;br /&gt;
For more information please read [http://www.opengroup.org/onlinepubs/007908799/xbd/locale.html local-Specification of Unix Open]&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4424</id>
		<title>User:Mingmei</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4424"/>
				<updated>2006-09-01T16:53:22Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;hello everybody!&lt;br /&gt;
&lt;br /&gt;
Now I am ready to work on this [[internationalization|semester thesis]]. Last two weeks I was working as interpreter at Alstom Power. It was a lot of fun, but it was also quite stressy.&lt;br /&gt;
&lt;br /&gt;
我现在在做学期论文，论题是[[internationalization|国际化]]。上两周我在阿而斯通做技术翻译，紧张而有趣。&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4423</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Internationalization&amp;diff=4423"/>
				<updated>2006-09-01T16:34:30Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: new account for Hong&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:Mingmei|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:Mingmei |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>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4422</id>
		<title>User:Mingmei</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4422"/>
				<updated>2006-09-01T16:31:27Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: link to my project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;hello everybody!&lt;br /&gt;
&lt;br /&gt;
Now I am ready to work on this [[internationalization|semester thesis]]. Last two weeks I was working as interpreter at Alstom Power. It was a lot of fun, but it was also quite stressy.&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4421</id>
		<title>User:Mingmei</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=User:Mingmei&amp;diff=4421"/>
				<updated>2006-09-01T16:28:20Z</updated>
		
		<summary type="html">&lt;p&gt;Mingmei: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;hello everybody!&lt;br /&gt;
&lt;br /&gt;
Now I am ready to work on this semester thesis. Last two weeks I was working as interpreter at Alstom Power. It was a lot of fun, but it was also quite stressy.&lt;/div&gt;</summary>
		<author><name>Mingmei</name></author>	</entry>

	</feed>