diff --git a/src/main/java/org/cryptomator/launcher/SupportedLanguages.java b/src/main/java/org/cryptomator/launcher/SupportedLanguages.java index 23d3e8fe0..1d2f22da7 100644 --- a/src/main/java/org/cryptomator/launcher/SupportedLanguages.java +++ b/src/main/java/org/cryptomator/launcher/SupportedLanguages.java @@ -31,11 +31,11 @@ public class SupportedLanguages { public SupportedLanguages(Settings settings) { var preferredLanguage = settings.languageProperty().get(); preferredLocale = preferredLanguage == null ? Locale.getDefault() : Locale.forLanguageTag(preferredLanguage); - var sorted = LANGUAGE_TAGS.stream().sorted((a, b) -> { - var collator = Collator.getInstance(preferredLocale); - collator.setStrength(Collator.PRIMARY); - return collator.compare(Locale.forLanguageTag(a).getDisplayName(), Locale.forLanguageTag(b).getDisplayName()); - }).collect(Collectors.toList()); + var collator = Collator.getInstance(preferredLocale); + collator.setStrength(Collator.PRIMARY); + var sorted = LANGUAGE_TAGS.stream() // + .sorted((a, b) -> collator.compare(Locale.forLanguageTag(a).getDisplayName(), Locale.forLanguageTag(b).getDisplayName())) // + .collect(Collectors.toList()); sorted.add(0, Settings.DEFAULT_LANGUAGE); sorted.add(1, ENGLISH); sortedLanguageTags = Collections.unmodifiableList(sorted);