Culture-specific data handling

Culture-specific data handling may be part of a program, and such a program may supply different data for different locales. In addition, a program may use different algorithms to process character data based on the language and culture.

For example, recognition of the start and end of a word and the method of hyphenation of a word across two lines varies depending on the locale. Programs that deal with such functionality need access to these tables or algorithms based on the current locale setting at run time. You can handle such programs in the following ways:

  • Compile all the algorithms and tables, and load them with the program.

    This method makes it difficult to add or modify the algorithms and tables. Whenever a new algorithm or table is added, the entire program must be relinked.

  • Keep the locale-specific algorithms and tables in a file, and load them at run time, depending on the current locale setting.

    This method makes it easier to modify and add algorithms and tables. However, there is no standard defined way to load algorithms. In AIX®, you can achieve this using the load subroutine, but programs that use the load subroutine might not be portable to other systems.