The the native MS approach is indeed resource DLLs as vlastimil suggests though the recommended way to use them is through
Microsoft Multilingual User (MUI). I personally found this example,
Hello MUI, great for getting up to speed with the API.
The FSF guys have long used gettext as mouser mentioned. Recently Boost added a localisation library,
Boost.Locale, to their ever expanding collection. I haven't yet had a chance to use it, but looks neat. It seems to build on both gettext and
ICU.
Some C++ apps come with language files that look like this:
HELLOWORLD "Hello, World!"
I'm curious: how is this loaded and interpreted? Is HELLOWORLD a string literal, and you have a long list of conditionals such as "if id equals "HELLOWORLD" then sHelloWorld = id, else if..."? (That would be quite slow and it's one of the things I'm trying to avoid in Delphi.) Or do these strings map to numeric values somehow? Or something else yet?
Silly question!
-tranglos
Nope not silly, my guess is that the file is loaded into an
associative array of some kind. In C++ that could be as simple as an STL
std::map<std::string, std::string> container.