Have a problem with internationalization, i'd never before use it so maiby i use stupid way
Always before for display my strings in Ukrainian languages i use QTextCodec alike :
****
listStaff->addColumn(m_pCodec->toUnicode(("Усі"));
QTextCodec *m_pCodec = QTextCodec::codecForName("CP1251");
****
listStaff->addColumn(m_pCodec->toUnicode(("Усі"));
To copy to clipboard, switch view to plain text mode
Now i must translate my program in Russian languages,and i add tr() to all my ukrainian strings in code alike:
****
listStaff->addColumn(m_pCodec->toUnicode((tr("Усі")));
QTextCodec *m_pCodec = QTextCodec::codecForName("CP1251");
****
listStaff->addColumn(m_pCodec->toUnicode((tr("Усі")));
To copy to clipboard, switch view to plain text mode
Then i generate *.qm file with my Ukr-Rus translations. But after run program i see only "?????" instead my russian translate...So i think that *.qm file keep my russian string in Unicode format...but how i must display it if in my code for all strings i always use QTextCodec::fromUnicode()?
p.s. i feel that my start gui languages must be English and then i'll never must use QTextCodec,just only create translations for needed languages....but it will be in future how i can solve this problem now ?
Bookmarks