最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

qt - QCoreApplication::removeTranslator doesn't set date format back to English - Stack Overflow

programmeradmin0浏览0评论

My Qt application allows to change the language during runtime. This works all perfect except the date format. (And maybe other localized formats too.) When the app switches to any language, I install it with two calls of QCoreApplication::installTranslator, one for the Qt translations and one for my own translations. This works fin including the date format. When the app switches to English, I uninstall the translation with two calls of QCoreApplication::removeTranslator. Then everything is in English except the date format.

Is there anything else I have to do when I want completely switch to English?

My Qt application allows to change the language during runtime. This works all perfect except the date format. (And maybe other localized formats too.) When the app switches to any language, I install it with two calls of QCoreApplication::installTranslator, one for the Qt translations and one for my own translations. This works fin including the date format. When the app switches to English, I uninstall the translation with two calls of QCoreApplication::removeTranslator. Then everything is in English except the date format.

Is there anything else I have to do when I want completely switch to English?

Share Improve this question asked Feb 4 at 8:26 Mr. ClearMr. Clear 6526 silver badges17 bronze badges 1
  • Is there anything else I have to do when I want completely switch to English? - install an english translator. – chehrlic Commented Feb 4 at 19:07
Add a comment  | 

1 Answer 1

Reset to default 0

The date format has nothing to do with the installed language. It can be set with:

QLocale::setDefault(QLocale::English);
发布评论

评论列表(0)

  1. 暂无评论