National Language Support (NLS) APIs

National Language Support APIs enable your applications to get and save (query and change) product settings that are relevant to different language versions.

Through NLS, the product supports many national languages. NLS allows users to work on a system in the language of their choice. The support also ensures that the data that is sent to and received from the system appears in the form and order that is expected. By supporting many different languages, the system operates as intended, from both a linguistic and a cultural point of view.

All IBM® i functions use a common set of program code, regardless of which language you use on the system. For example, the IBM i program code on a U.S. English language version and the IBM i program code on a Spanish language version are identical. Different sets of textual data are used, however, for different languages. Textual data is a collective term for menus, displays, lists, prompts, options, Online help information, and messages. This means that you see Help for the description of the function key for Online help information on a U.S. English system, while you see Ayuda on a Spanish system. Using the same program code with different sets of textual data allows the system to support more than one language on a single system.

You can add convenient functions into your product applications, including the capability to:

  • Select from a list of installed national languages.
  • Convert character data from one code page to another. This permits computers that use different code pages, such as personal computers and the IBM i operating system, to share information.
  • Automatically replace the translatable text (caption and control names) within dialog boxes. This expands the size of the controls according to the text that is associated with them. The size of the dialog-box frame also is adjusted automatically.
Note: It is essential to build National Language Support considerations into the design of the program right from the start. It is much harder to add NLS or DBCS support after a program has been designed or coded.

NLS APIs required files:

NLS API type Header file Import library Dynamic Link Library
General cwbnl.h cwbapi.lib cwbnl.dll
Conversion cwbnlcnv.h cwbcore.dll
Dialog-box cwbnldlg.h cwbnldlg.dll

Programmer's Toolkit:

The Programmer's Toolkit provides NLS documentation, access to the NLS APIs header files, and links to sample programs. To access this information, open the Programmer's Toolkit and select Data Manipulation > C/C++ APIs.