Skip to content

Commit

Permalink
fix en_US locale handling in QgsHelp
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Nov 25, 2017
1 parent 72553a6 commit 3d6aa9c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/qgsapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 3d6aa9c

Please sign in to comment.