opt: layout according to the language

This commit is contained in:
YiFang Xiao 2024-07-06 10:51:40 +08:00
parent 297795a654
commit 0721a58c01

View file

@ -556,6 +556,8 @@ int main( int argc, char ** argv )
QLocale locale( localeName );
QLocale::setDefault( locale );
QApplication::setLayoutDirection( locale.textDirection() );
if ( !qtTranslator.load( "qt_extra_" + localeName, Config::getLocDir() ) ) {
qtTranslator.load( "qt_extra_" + localeName, QLibraryInfo::location( QLibraryInfo::TranslationsPath ) );
app.installTranslator( &qtTranslator );