International software is software that can support multiple languages and cultures. An international program should be able to:
The conventions for representing dates and times vary from one country to another. For example, in the U.S.A., the month is given first; in the U.K the day is specified first. Therefore, the date 12/5/1993 is interpreted as December 5, 1993 in the U.S.A., and as May 12,1993 in the U.K.
The character that represents the decimal point (the radix character) and the thousands separator character vary from one country to another. For example, in the U.K. the period (.) is used to represent the radix character, and the comma is used as a separator. However, in Germany, the comma is used as the radix character and the period is the separator character. Therefore, the number 2,345.67 in the U.K. is the same as 2.345,67 in Germany.
Currency values are represented by different symbols and can be formatted using a variety of separator characters, depending on the currency.
String comparison functions such as strcmp compare strings by comparing the codepoint values of the characters in the strings. However, some languages require more complex comparisons to correctly sort strings.
To meet the above requirements, an application should not make any assumptions about the language, local customs or the coded character set used. All this localization data should be defined separately from the program, and only bound to it at run-time.
The rest of the chapter describes how you can create international software using DEC C.