mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Use en_US if default locale has no country defined.
On some systems there is not country defined, in that case we use en_US
This commit is contained in:
parent
d929128652
commit
86f44c7a64
1 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue