[Merkaartor] i18n?

Colin Marquardt colin at marquardt-home.de
Mon Mar 31 00:32:38 BST 2008


Daniel van Gerpen <dvg at jccnet.de> writes:

> On Sat, 29 Mar 2008 20:22:20 +0100
> Colin Marquardt <colin at marquardt-home.de> wrote:
>
>> could someone who is familiar with i18n in Qt set this up for
>> merkaartor and mark up some strings as an example? I (or someone
>> else) can then take care of the rest of the strings, and provide
>> translations.

> Addtionally the app has to provide some setup code for the translator
> infrastructure to work.

Okay, I have something in principle. However, there is one snag:
Among others, I am supposed to add this one line here:

	qtTranslator.load("qt_" + QLocale::system());

This leads to the following error however:

Main.cpp: In function 'int main(int, char**)':
Main.cpp:18: error: no match for 'operator+' in '"qt_" + QLocale::system()()'
/usr/include/qt4/QtCore/qbytearray.h:494: note: candidates are: const QByteArray operator+(const QByteArray&, const QByteArray&)
/usr/include/qt4/QtCore/qbytearray.h:496: note:                 const QByteArray operator+(const QByteArray&, const char*)
[...]

It's a long time since I did some C++, so I don't know how to
proceed.

When I just replace that line with 
	//qtTranslator.load("qt_de");
I get a nicely translated Merkaartor (well, just a few strings, but
still).

And what a pain it is to use that "Qt Linguist" when you are used to
do translations in Emacs...

Cheers
  Colin




More information about the Merkaartor mailing list