09-22-2013 04:43 PM
Yes, but that requires a translation for each file. The way I have described it above requires you only to stick to a naming convention (for instance file_en.png and file_es.png) but keeps the translation files clean (only requires you to provide the language code for each supported language). You use it like this:
QString lang = tr("kLoc_lang");
QString filename = QString("file_%1.png").arg(lang);
10-02-2013 01:59 PM - edited 10-02-2013 02:10 PM
Your string translation and locale formats are taken care of if you use the localization APIs that the platform supports.
For the language specific images, you can detect/listen to the system locale(e.g. language) and load the image based on the locale/language settings.
My advice is to use if-else statement for checking and loading the language dependent images.
10-02-2013 02:09 PM - edited 10-02-2013 02:18 PM
you can also add localization for different data sources based on localization if you're interested:
source: qsTr("tutorial.xml") + Retranslate.onLanguageChanged
than in your translation file you can change it to a different source based on language :