internationalizationalthough internationalization of an application (i18n for short) involves far more than just translating its text messages to another message - date, time and currency formats need changing too, some languages are written left to right and others right to left, character encoding may differ and many other things may need changing too - it is a necessary first step. wxwidgets provides facilities for message translation with its wxlocale class and is itself fully translated into several languages. please consult wxwidgets home page for the most up-to-date translations - and if you translate it into one of the languages not done yet, your translations would be gratefully accepted for inclusion into future versions of the library! the wxwidgets approach to i18n closely follows the gnu gettext package. wxwidgets uses the message catalogs which are binary compatible with gettext catalogs and this allows to use all of the programs in this package to work with them. but note that no additional libraries are needed during run-time, however, so you have only the message catalogs to distribute and nothing else. during program development you will need the gettext package for working with message catalogs. warning: gettext versions < 0.10 are known to be buggy, so you should find a later version of it! there are two kinds of message catalogs: source catalogs which are text files with extension .po and binary catalogs which are created from the source ones with msgfmt program (part of gettext package) and have the extension .mo. only the binary files are needed during program execution. the program i18n involves several steps:
see also the gnu gettext documentation linked from docs/html/index.htm in your wxwidgets distribution. see also writing non-english applications. it focuses on handling charsets related problems. finally, take a look at the i18n sample which shows you how all this looks in practice. translating menu accelerators if you translate the accelerator modifier names (ctrl, alt and shift) in your menu labels, you may find the accelerators no longer work. in your message catalogs, you need to provide individual translations of these modifiers from their lower case names (ctrl, alt, shift) so that the wxwidgets accelerator code can recognise them even when translated. wxwidgets does not provide translations for all of these currently. wxwidgets does not yet handle translated special key names such as backspace, end, insert, etc.
|