To do this, all of the translated strings, which were previously included as #define, were changed to external global variables and compiled into a new file, localizedstrings.cpp. This is the only locale-specific object file and is compiled once per locale. It is linked in with all of the other locale-independent object files to create the locale-dependent executable.
The main motiviation for this change was to improve build times. Instead of compiling each file for each langauge, we only have to compile most files once.
On my Windows XP machine:
- The build time is reduced by several hours.
- The resulting executables are ~20KB larger (~100KB for screensavers).
- The resulting installer is 3MB smaller.