Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Native language support

&pagelevel(3)&pagelevel

The most of the Unix systems always used to be based on the ASCII coded character set, with American English as the language in which the user communicated with the computer. For the commercial market, however, it has always been essential to offer interactive programs communicating in the language of the program user (language in this sense being taken to include regional conventions such as currency formats); and as a result considerable extra effort was required to produce national variants of programs for other markets.

The increasing international popularity of Unix systems has now made it necessary to enhance the systems to cater flexibly for the differing scripts, languages and cultural conventions of its users.

With NLS (the Native Language System) X/Open has defined an interface which makes it possible to

  • develop applications which communicate with the user in various native languages and conform to the associated local customs. Programs of this type make no assumptions about the language of the user and keep the data specifications separate from the program logic. Hence they are referred to as internationalized programs.

  • supply the correct native language and associated local customs to the runtime environment of an internationalized application. This technique is known as localization. Hence the set of conventions relating to local custom and language which applies in a given environment is referred to as the locale.

The tools which NLS provides for these purposes include:

  • an announcement mechanism which enables users to identify their own native language, local custom and codeset requirements to programs at runtime. This mechanism works on the basis of environment variables.

  • message catalogs which allow program messages to be held apart from the program logic, translated into other languages and bound to the application at runtime.

  • internationalized C library functions which make no assumptions about native language, territory and codeset and are thus capable of handling universal character classification, case conversion (up/downshifting), number format conversion and string collation (sorting).

  • a set of C library functions which allow a personal language environment to be set, modified and disabled at program runtime.

All the POSIX commands described in this manual are 8-bit transparent. That includes all the command-line arguments and all the data and characters interpreted by the commands.

There are, however, still certain restrictions on the portability of 8-bit data between POSIX and other systems:

  • Data interchange between systems over email links may be restricted to 7-bit data on account of the mail or networking protocols being used.

  • 8-bit data and file names may only be portable to systems which comply with the X/Open system interface definition.