mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Merge pull request #2022 from ManfredKarrer/fix-missing-country-in-locale
Use en_US if default locale has no country defined.
This commit is contained in:
commit
99e7c670ce
@ -25,11 +25,18 @@ import java.util.Locale;
|
||||
|
||||
public class GlobalSettings {
|
||||
private static boolean useAnimations = true;
|
||||
private static Locale locale = Locale.getDefault();
|
||||
private static Locale locale;
|
||||
private static final ObjectProperty<Locale> localeProperty = new SimpleObjectProperty<>(locale);
|
||||
private static TradeCurrency defaultTradeCurrency;
|
||||
private static String btcDenomination;
|
||||
|
||||
static {
|
||||
locale = Locale.getDefault();
|
||||
|
||||
// On some systems there is not country defined, in that case we use en_US
|
||||
if (locale.getCountry() == null || locale.getCountry().isEmpty())
|
||||
locale = Locale.US;
|
||||
}
|
||||
|
||||
public static void setLocale(Locale locale) {
|
||||
GlobalSettings.locale = locale;
|
||||
|
Loading…
Reference in New Issue
Block a user