Friday February 17, 2006 I am new to globalization. Our organization (Globalization) is responsible for product localization and internationalization. Prior to joining this group, I was in development and backline support for various software product lines within Sun.
I have faced internationalization/localization issues throughout my career, but I did not really have a deep understanding of them. Now that I have joined this organization, I have to come to realize that there are a lot of cool stuff to learn! Some of these topics may be trivial to globalization gurus, but they may be of some interest to others. If you want to learn more about globalization, read on!
In globalization, we need to always switch back and forth between different locales, especially when we test products.
On Solaris, the common way is to relogin and select a different locale, assuming that the necessary font packages are already installed on the system. What about if you want to change the locale on a terminal window on the fly? You can use a command called locale to check the current setting.
Examples:
Using C (Posix) % locale LANG=C LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= Using ja (EUC) % locale LANG=ja LC_CTYPE="ja" LC_NUMERIC="ja" LC_TIME="ja" LC_COLLATE="ja" LC_MONETARY="ja" LC_MESSAGES="ja" LC_ALL=
You can change these environment variables to change the locale setting for that window.
On Windows, there is a command called chcp. When you type chcp, it tells you what the active console code page is. If you want to change it, simply add the code page for that locale.
Examples:
This is the active console code for U.S. English.
This is the active console code for Japanese.
I also learned from my colleague, Yuko, who is the Creator localization lead as well as my valuable resource on localization and Creator, that there are a couple of batch files on Japanese Windows. If you type us, it executes chcp 437 and if you type jp, it executes chcp 932. Pretty handy! Thanks Yuko!
Posted by naoko
( Feb 17 2006, 03:33:41 PM PST )
Permalink
Comments [3]
| « November 2009 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | |||||
| Today | ||||||
Today's Page Hits: 45
Yep, i18n is hard :-) You might also be interested in the ever-useful <tt>nl_langinfo(3C)</tt> library function on Solaris, which you can use to find out the default codeset. For example :
#include <langinfo.h> #include <locale.h> #include <stdio.h> int main(char* args){ setlocale(LC_ALL,""); printf("%s\n",nl_langinfo(CODESET)); }Posted by Tim Foster on February 18, 2006 at 01:16 PM PST #
Posted by naoko on February 21, 2006 at 11:35 AM PST #
$ env LC_ALL=ja_JP.PCK locale code_set_name
PCK
$ env LC_ALL=ja locale code_set_name
eucJP
Posted by muffin on July 19, 2007 at 02:38 PM PDT #