Locales and Internationalization Different countries and cultures have varying conventions for how to communicate. These conventions range from very simple ones, such as the format for representing dates and times, to very complex ones, such as the language spoken. Internationalization of software means programming it to be able to adapt to the user's favorite conventions. In ANSI C, internationalization works by means of locales . Each locale specifies a collection of conventions, one convention for each purpose.
All programs inherit the chosen locale as part of their environment.
Provided the programs are written to obey the choice of locale, they will follow the conventions preferred by the user. What language to use for output, including error messages. What language to use for more complex user input. Some aspects of adapting to the specified locale are handled automatically by the library subroutines. For example, all your program needs to do in order to use the collating sequence of the chosen locale is to use strcoll or strxfrm to compare strings.