Section 4.6. Internationalization and Localization


4.6. Internationalization and Localization

In Chapter 3, we discussed internationalization (I18N) and localization (L10N) in Linux. In general, steps used to internationalize and localize programs in Solaris and Linux are similar. As you can see, Solaris tools and APIs used for I18N and L10N such as xgettext, msgfmt, bindtextdomain(), gettext(), iconv(), dgettext(), and dcgettext() are also available in Linux. Solaris and Linux both support sets of internationalization APIs specified by IEEE POSIX 1003.1-2001 and the SUSv3. The default location for message files in Solaris is also similar to Linux, /usr/lib/locale.

Linux lets the installer choose the default locale during the system installation. Following is the output of the command locale showing the current locale environment from one of the author's Linux systems:

# locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= 


The default locale in Solaris is shown here:

$ locale LANG= LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= 


Table A-1 in appendix A, "Solaris to Linux Reference Tables," provides a comparison of the internationalization APIs between Solaris and Linux.




UNIX to Linux Porting. A Comprehensive Reference
UNIX to Linux Porting: A Comprehensive Reference
ISBN: 0131871099
EAN: 2147483647
Year: 2004
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net