diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 4d09ae097..1dae702ca 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -298,10 +298,11 @@ LocalePage::guessLCLocale() if ( m_localeGenLines.isEmpty() ) return "en_US.UTF-8 UTF-8"; + QString myLanguage = myLocale.name().split( '_' ).first(); QStringList linesForLanguage; foreach ( QString line, m_localeGenLines ) { - if ( line.startsWith( myLocale.name().split( '_' ).first() ) ) + if ( line.startsWith( myLanguage ) ) linesForLanguage.append( line ); }