Multi-language development in linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. Developing multi-language software is very difficult. The encoding methods, currency symbols, date formats, numeric formats, and text performances of character sets vary from country to country, glibc provides a large number of functions to handle these tasks, so we will not explain them any more. What we need to do here is to use a simple example to describe the usage of GetText. GetText is a series of tools and library functions that help programmers and translators develop multilingual software.
GetText is not a mysterious thing. If you do not want to find a under Win32, I think it should be a resource file (. it manages the strings for you and automatically loads the strings of the corresponding language at runtime according to the current language.
Here, we suppose we want to develop a software package named foonly, which has only one source file foonly. c. Its function is to print "Hello, GetText!" on the screen !". If multiple languages are not supported, the content of foonly. c is as follows: