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

admin2025-04-16  2

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);
转载请注明原文地址:http://www.anycun.com/QandA/1744733496a86855.html