I study QT with a book.
I write the codes according to the samples.
But I meet an issue with the "locale"
I use the translator with "qt_zh_CN.qm", but the dialog doesn't show the right characters.
Here is the cods:
and here is my locle echoCode:
QTranslator translator; { QString str; bool bFinded = false; bFinded = translator.load("qt_zh_CN", "/usr/share/qt4/translations/"); if(bFinded) { qApp->installTranslator(&translator); } else } MyDialog dlg; return dlg.exec();
LANG=en_US.UTF-8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Anyone can help me?