hi guys
i m working on qt4.2 on Mac OS X Platform
can anyone tell me how can convert my .app to another languages like japnese ,spanish,italino etc.
thanks in advance
Printable View
hi guys
i m working on qt4.2 on Mac OS X Platform
can anyone tell me how can convert my .app to another languages like japnese ,spanish,italino etc.
thanks in advance
Hi
Please, start with reading Internationalization with Qt.
Correct ... next if you have the language file tell main.cpp to find its...
Code:
/* mac osx bundle path resolver */ { QString languser,languagesistem,langqt; languser = getenv("LANG"); languser = languser.toLower(); languagesistem = loci.name(); languagesistem = languagesistem.toLower(); languagesistem = languagesistem.left(2); /* Window XP Prof MUI Multiuser Multilanguage == stay only "c" language && user setting setenv !!! */ /* if not XP MUI BUG! return ... */ if (languagesistem == "c") { if (languser.size() > 2 && languser.contains("_")) { languagesistem = languser.left(2); /* grep from LANG if QLocale having C*/ } } return languagesistem; /* return de or en,it,fr .. first two from language*/ } int main(int argc, char *argv[]) { /* qsetting */ /* bundle mac paths */ #if defined Q_WS_MAC QStringList path; dir.cdUp(); path.append(dir.absolutePath()); dir.cd("plugins"); path.append(dir.absolutePath()); dir.cdUp(); path.append(dir.absolutePath()); #endif #if defined Q_WS_MAC #endif #if defined Q_WS_WIN localedirfile = QString("%1/locale/edit_%2.qm").arg(QCoreApplication::applicationDirPath()).arg(UserLanguage()); #endif #if defined Q_WS_X11 localedirfile = QString("%1/locale/edit_%2.qm").arg(WORK_CACHEDIR).arg(UserLanguage()); /* /home/user/.appname/ */ #endif QTranslator translator; translator.load(localedirfile); a.installTranslator(&translator); /* next class main to start ....*/