Internationalization for two Applications
-
Hi
I have a question about Internationalization.
I have the following problem:
We are developing to applications for two different plattforms.
Both apps are more or less the same.
One App is for a screen 800x600, the other app is for a screen 320x240.
he shown informations are similar or equal.The current procedure for internationalization would be to generate and translate the file for each app.
Is there a way in Qt to have a kind of language resource file which are used in both apps so that the translater only has to translate one file.
Thanks for the help.
Best regards
J
-
Should be possible, yes. You can add multiple files to your translation unit. Start with referencing the "lupdate documentation":http://doc.qt.nokia.com/4.7/linguist-manager.html#lupdate.
-
-
Ah okay,
I had something similar in mind. E.g creating a translation.h file which contains const qstring which are used in both applications.The big disadvantage here is that we do not have an order by classes. All string are mixed up.
So the conclusion here is that there is no easy way that two apps use one resource file.
Thanks.
Cheers
J -
Okay if I understand it correctly.
I have two projects, one for the 800x600 and the other one for 320x240Now I run lupdate over both project this will generate one big ts-file.
So now the ts-file has all classes of both project in it. Correct?
Are those classes are ordered by project or are they mixed?
Cheers
J -
[quote author="messi" date="1295349182"]Ah okay,
I had something similar in mind. E.g creating a translation.h file which contains const qstring which are used in both applications.The big disadvantage here is that we do not have an order by classes. All string are mixed up.
So the conclusion here is that there is no easy way that two apps use one resource file.
Thanks.
Cheers
J[/quote]Hi you can have a file, but noit with static strings. What I already saw (and what does not work) is having global variables (or local ones with static) that are initialized like this:
@
static const QString szText = QObject::tr("Bla");
@In this case it was a module local constant. But the tr Marco is executed, before your translation file is loaded, as global variables are initialized, before executing code for main().