HPlogo HP Xlib Extensions:

Chapter 7 Internationalization Support

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

An internationalized application is adaptable to the requirements of different native languages, local customs, and character string encodings. The process of adapting the operation to a particular native language, local custom, or string encoding is called localization. A goal of internationalization is to permit localization without program source modifications or recompilation.

Release 5 of X11 Xlib provides support for standard routines for the input and output of internationalized text. In all cases this standard functionality should be used instead of the HP proprietary mechanisms explained in this chapter. The functions described in this chapter are provided for backwards compatibility and will be deleted in a future release.

Internationalization in Xlib is based on the concept of a locale. A locale defines the "localized" behavior of a program at run-time. Locales affect Xlib in the following ways:

  • Encoding and processing of input method text.

  • Encoding of resource files and values.

  • Encoding and imaging of text strings.

  • Encoding and decoding for inter-client text communication.

Xlib provides support for localized text imaging and text input. Sets of functions are provided for multibyte ("char&*") text as well as wide character ("wchar_t") text in the form supported by the host C language environment.

To get this functionality, it is necessary for the client to call either setlocale() or XtSetLanguageProc() to initialize the clients locale data base. If the client wishes to display localized title strings with Motif's window manager (mwm), then XtSetLanguageProc() should be used instead of setlocale().

© 1995 Hewlett-Packard Development Company, L.P.