wxMax project localization with Poedit?
BlitzMax Forums/Brucey's Modules/wxMax project localization with Poedit?
| ||
Hi folks, I just read about localization with wxWidgets. If I understand correct the translation function _() searches for a translation by key-value pairs. The actual text is the key, the value is the translation. Therefor wxWidgets loads the translations from mo-files like it is done in the localization example. A mo-file can be compiled for example with the poedit tool from a po-file. A po-file simply contains all strings and their translation. Now I want to create such a po-file with Poedit from my BMax project. I created a new catalog in the catalogs manager with the directory set to my project dir and added a parser for bmx-files under "file"->"preferences"->"parsers" based on the C++ parser. But when I "update all" no files are found. What am I doing wrong? |
| ||
OK, I found the problem: I made a mistake in the parser settings. xgettext needs a language already known eg. C,C++,Python,Perl,Java... So my parser settings are: Language: "BlitzMax" List of extensions: "*.bmx" Parser Command: "xgettext --language=C --add-comments=TRANSLATORS --force-po -o %o %C %K %F" An item in keyword list: "-k%k" An item in input files list: "%f" source code charset: "--from-code=%c" (Of course there are lots of errors on parsing the bmx files because a c parser is used but all strings are found.) |