[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

National Language Support (NLS) Quick Reference

The NLS Quick Reference provides a place to get started internationalizing programs. The following sections offer advice and a practical guide through the NLS documentation:

National Language Support Do's and Don'ts

The following list presents a set of NLS guiding principles and advice. The intention is to prevent the occurrence of common errors when internationalizing programs. See the "National Language Support Overview for Programming" for more information about NLS.

National Language Support Checklist

The National Language Support (NLS) Checklist provides a way to analyze a program for NLS dependencies. By going through this list, one can determine what, if any, NLS functions must be considered. This is useful for both programming and testing. If you identify a set of NLS items that a program depends on, a test strategy can be developed. This facilitates a common approach to testing all programs.

All major NLS considerations have been identified. However, this list is not all-encompassing. There may be other NLS questions that are not listed. See "National Language Support Overview for Programming" for more information about NLS. See "National Language Support Do's and Don'ts" for a brief list of NLS advice.

Program Operation Checklist:

  1. Does the program display translatable messages to the user, either directly or indirectly? An example of indirect messages are those that are stored in libraries.

    If yes:

  2. Does the program compare text strings?

    If yes:

  3. Does the program parse path names of files?

    If yes:

  4. Does the program use system names, such as node names, user names, printer names, and queue names?

    If yes:

  5. Does the program use character class properties, such as uppercase, lowercase, and alphabetic?

    If yes:

  6. Does the program convert the case (upper or lower) of characters?

    If yes:

  7. Does the program keep track of cursor movement on a tty terminal?

    If yes:

  8. Does the program perform character I/O?

    If yes:

  9. Does the program step through an array of characters?

    If yes:

    If not:
  10. Does the program need to know the maximum number of bytes used to encode a character within the code set?

    If yes:

  11. Does the program format date or time numeric quantities?

    If yes:

  12. Does the program format numeric quantities?

    If yes:

  13. Does the program format monetary quantities?

    If yes:

  14. Does the program search for strings or locate characters?

    If yes:

  15. Does the program perform regular-expression pattern matching?

    If yes:

  16. Does the program ask the user for affirmative/negative responses?

    If yes:

  17. Does the program use special box-drawing characters?

    If yes:

  18. Does the program perform culture-specific or locale-specific processing that is not addressed here?

    If yes:

AIXwindows CheckList

The remaining checklist items are specific to the AIXwindows systems.

  1. Does your client use labels, buttons, or other output-only widgets to display translatable messages?

    If yes:

  2. Does your client use X resource files to define the text of labels, buttons, or text widgets?

    If yes:

  3. Is keyboard input localized by language?

    If yes:

  4. Does your client present lists or labels consisting of localized text from user files rather than from X resource files?

    If yes:

  5. Does your program do any presentation operations (Xlib drawing, printing, formatting, or editing) on bidirectional text?

    If yes:

If the response to all the above items is no, then the program probably has no NLS dependencies. In this case, you may not need the locale-setting subroutine setlocale and the catalog facility subroutines catopen and catgets.

Message Suggestions

The following are suggestions on how to make messages meaningful and concise:

Describing Command Syntax in Messages

Writing Style of Messages

Clear writing aids in message translation. The following guidelines on the writing style of messages include terminology, punctuation, mood, voice, tense, capitalization, format, and other usage questions.

Related Information

National Language Support Overview for Programming. Locale Overview for System Management, How to Change the Language Environment, and How to Change Your Locale in AIX Version 4.3 System Management Guide: Operating System and Devices.

Code Set Overview, Code Set Strategy.

National Language Support Overview for System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.

The chlang command, dspcat command, dspmsg command, gencat command, localedef , lslpp command, mkcatdefs command, runcat command in AIX Version 4.3 Commands Reference.

Understanding Code Set Strategy in AIX Kernel Extensions and Device Support Programming Concepts.

Character Set Description (charmap) source file format, Locale Definition source file format in AIX Version 4.3 Files Reference.

The environment file in AIX Version 4.3 Files Reference.


[ Previous | Next | Contents | Glossary | Home | Search ]