Skip to content
Permalink
Browse files

fix en_US locale handling in QgsHelp

  • Loading branch information
alexbruy committed Nov 25, 2017
1 parent 72553a6 commit 3d6aa9c9f2fc0cacce65e9a76c84dd546a7caaa1
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/qgsapplication.cpp
@@ -825,7 +825,14 @@ QString QgsApplication::locale()
bool overrideLocale = settings.value( QStringLiteral( "locale/overrideFlag" ), false ).toBool();
if ( overrideLocale )
{
return settings.value( QStringLiteral( "locale/userLocale" ), QString() ).toString();
QString locale = settings.value( QStringLiteral( "locale/userLocale" ), QString() ).toString();
// don't differentiate en_US and en_GB
if ( locale.startsWith( QStringLiteral( "en" ), Qt::CaseInsensitive ) )
{
return locale.left( 2 );
}

return locale;
}
else
{

0 comments on commit 3d6aa9c

Please sign in to comment.
You can’t perform that action at this time.