Go to main content

International Language Environments Guide for Oracle® Solaris 11.3

Exit Print View

Updated: December 2018
 
 

Locale Aliasing

While the most common locales are usually well supported across the major operating systems, their names are different in many cases. For example, although Oracle Solaris uses fr_FR.UTF-8 as the locale name for French as spoken in France using UTF-8 encoding, IBM AIX uses FR_FR, and HP-UX 11.11 and RHEL 5.4 use fr_FR.utf8. This inconsistency can be burdensome in a heterogeneous environment or when migrating to Oracle Solaris.

To address this issue, support for locale aliases was introduced in libc in Oracle Solaris 11. Locale name aliases are accepted and mapped to corresponding canonical locale names, if any, during the locale selection process, as specified in the setlocale(3C) man page, and message object or message catalog processing, as specified in the gettext(1), catopen(3C), and gettext(3C) man pages.

In addition, to provide better compatibility with earlier Oracle Solaris releases, the messaging functions now look for the message object or catalog using the obsolete locale names, such as fr or fr_FR, as additional locale names to check against. For more information, see "Short Form Locales" "Localization" section on the Oracle Solaris 11 - End of Feature Notices page.

For example, a typical use case is a predominantly Linux environment where the Linux style locale name is used in the locale announcement in the user's shell initialization file. For example, the command setenv LANG ja_JP.utf8 is included in $HOME/.login, and the home directory is NFS-mounted. In this networked environment, when a user logs into an Oracle Solaris 11 system, the locale alias support mechanism will internally and transparently map the locale name to the corresponding Oracle Solaris locale name, which is ja_JP.UTF-8, and will honor and support the user-specified locale name. Similarly, when non Oracle Solaris locale names are passed to a remote Oracle Solaris 11 system through ssh(1), they will be recognized, honored, and supported.

For more information about local aliasing, see the locale_alias(5) man page, which also has full lists of locale name mappings.