Computer users all over the world prefer to interact with their systems using their own local languages and cultural conventions. As a developer aiming for high international acceptance of your products, you need to provide users the flexibility for modifying input and output conventions to comply with local requirements, such as different currency and numeric representations. You must also provide the capability for translating interfaces and messages without necessitating many different language versions of your software.
Two processes that enhance software for worldwide use are internationalization and localization. Internationalization is the process of building into software the potential for worldwide use. It is the result of efforts by programmers and software designers during software development.
Internationalization requires that developers consciously design and implement software for adaptation to various languages and cultural conventions, and avoid hard-coding elements that can be localized, like screen positions and file names. For example, developers should never embed in their code any messages, prompts, or other kind of displayed text, but rather store the messages externally, so they can be translated without requiring the program to be recompiled. A developer of internationalized software should never assume specific conventions for formatting numeric or monetary values, or for displaying date and time.
Localization is the process of actually adapting internationalized software to the needs of users in a particular geographical or cultural area. It includes translation of messages by software translators. It requires the creation and availability of appropriate tables containing relevant local data for use in a given system. This typically is the function of system administrators and operating system vendors, who build facilities for these functions into the program execution environment. Users of internationalized software are involved in the process as well, when they select the local conventions they prefer from the set of conventions available in their environment.
The C++ Standard Library offers a number of classes that support internationalization of your programs. We describe them in detail in this chapter. Before we do, however, we would like to survey some of the cultural conventions that impact software internationalization, and are supported by the programming languages C and C++ and their respective standard libraries. Of course, there are many issues outside our list that need to be addressed, like orientation, sizing and positioning of screen displays, vertical writing and printing, selection of font tables, handling international keyboards, and so on. But let us begin here.