Using constant instead of new object
This commit is contained in:
parent
6fb261325a
commit
7e10e34791
1 changed files with 2 additions and 2 deletions
|
@ -86,11 +86,11 @@ public class SpecialPhrases {
|
||||||
/**
|
/**
|
||||||
* Returns the preferred language
|
* Returns the preferred language
|
||||||
* @param set the OsmandSettings used
|
* @param set the OsmandSettings used
|
||||||
* @return Locale("en") if English names are chosen in the settings, Locale.getDefault otherwise
|
* @return ENGLISH if English names are chosen in the settings, Locale.getDefault otherwise
|
||||||
*/
|
*/
|
||||||
public static Locale getPreferredLanguage(OsmandSettings set){
|
public static Locale getPreferredLanguage(OsmandSettings set){
|
||||||
if (set.usingEnglishNames()) {
|
if (set.usingEnglishNames()) {
|
||||||
return new Locale("en");
|
return Locale.ENGLISH;
|
||||||
}
|
}
|
||||||
return Locale.getDefault();
|
return Locale.getDefault();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue