Translations files with Smart Installer
Hello guys,
One question about smart installer. For example in my *.pro file I have the tag "TRANSLATIONS = translation_pt_br.ts" and when I generate my "smart installer file" my *qs files does not are placed together. How can I do that, I mean, how can I distribute my translation file with the installer file ?
Best regards.
Re: Translations files with Smart Installer
Smart Installer has nothing to do with your content, the expectation is that by the time you use the smart installer you already have a fully working installation package for your application. Smart Installer will only ensure that said installation package will be installed on device after the needed dependencies are made available.
As for your application, if you have translation files converted to *.qs format, use DEPLOYMENT statements in the pro file to add them to your *_termplate.pkg file.
Re: Translations files with Smart Installer
Thanks Itomuta, but can you show me some example ? For example in this moment my *.pro has this :
symbian {
TARGET.UID3 = 0xe8e00840
# TARGET.CAPABILITY +=
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
ICON = icon.svg
}
how can I add the translator_pt_br.qs in my *_template.pkg ? (Sorry I'm new developer)..
Best regards.
Re: Translations files with Smart Installer
A search in the docs or in Forum Nokia wiki will return a solution in 99% of the cases.
See [url]http://wiki.forum.nokia.com/index.php/CS001424_-_Using_the_DEPLOYMENT_keyword_in_a_Qt_package_file[/url] and [url]http://doc.trolltech.com/latest/qmake-variable-reference.html#deployment[/url]
This would give you something like
[CODE]
symbian {
TARGET.UID3 = 0xe8e00840
# TARGET.CAPABILITY +=
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
ICON = icon.svg
myQsFiles.sources = *.qs
DEPLOYMENT += myQsFiles
}
[/CODE]
Re: Translations files with Smart Installer
In .pro file:
[code]
symbian: {
...
trFiles.sources = *.qm
DEPLOYMENT += trFiles
}
[/code]
in QApplication:
[code]
QString fileName="TypeGun_%1";
fileName=fileName.arg(QLocale::system().name());
QTranslator *translator=new QTranslator();
translator->load(fileName, QDir::currentPath());
this->installTranslator(translator);
[/code]