I'm wondering what approach to i18n folks have found useful for windows items that are typically included in a native C++/WTL MSWin application via the resource compiler?
I have some experience, albeit circa 2005, with the "traditional" approach to dealing with these things, roughly speaking: duplicate the resource file and translate into another language, dialogs and all. My experience with this was that it is a little painful. Would appreciate any feedback on positive experiences and how these were achieved.
I've also had some experience with GNU gettext, which seems to do a significantly better job separating the concerns of the developer from the concerns of the translator. Unfortunately I think the use of GNU gettext in the windows environment would mean abandoning the useful tools that come built in to Visual Studio for producing application menus and dialogs etc. Any suggestions on how this might be overcome would be appreciated.
One specific concern that I have is that MSWin doesn't have/use any layout managers (that I am aware of). This means开发者_如何学C that translating a dialog box to another language will probably require dimensional changes to the dialog box to accommodate any increase or decrease in text space requirements due to translation.
Any other suggestions on approach would also be appreciated.
Windows itself doesn't have any layout managers, but some UI libraries to use with Windows do. Just for one obvious example, Qt makes i18n quite a bit simpler than working with the Win32 API directly. It has managers for grid layout, flow layout, etc. It also has classes to directly support translation, including a QTranslator class that will look up translations in a translation file, direct support for conversion between different text representations, etc.
精彩评论