diff --git a/src/realm-settings/LocalizationTab.tsx b/src/realm-settings/LocalizationTab.tsx
index 393310d1e5..37af37cee0 100644
--- a/src/realm-settings/LocalizationTab.tsx
+++ b/src/realm-settings/LocalizationTab.tsx
@@ -70,7 +70,6 @@ export const LocalizationTab = ({
control,
name: "supportedLocales",
});
-
const internationalizationEnabled = useWatch({
control,
name: "internationalizationEnabled",
@@ -208,110 +207,107 @@ export const LocalizationTab = ({
)}
/>
- {internationalizationEnabled && (
- <>
-
- (
-
- )}
- />
-
-
- (
-
+ ) : (
+
+ );
+ }}
+ />
+
+
+ {
+ return internationalizationEnabled ? (
+ setDefaultLocaleOpen(!defaultLocaleOpen)}
+ onSelect={(_, value) => {
+ onChange(value as string);
+ setValueSelected(true);
+ setDefaultLocaleOpen(false);
+ }}
+ selections={
+ valueSelected
+ ? t(`allSupportedLocales.${value}`)
+ : realm.defaultLocale !== ""
+ ? t(
+ `allSupportedLocales.${
+ realm.defaultLocale || DEFAULT_LOCALE
+ }`
+ )
+ : t("placeholderText")
+ }
+ variant={SelectVariant.single}
+ aria-label={t("defaultLocale")}
+ isOpen={defaultLocaleOpen}
+ placeholderText={t("placeholderText")}
+ data-testid="select-default-locale"
+ >
+ {watchSupportedLocales?.map(
+ (locale: string, idx: number) => (
+
+ {t(`allSupportedLocales.${locale}`)}
+
+ )
+ )}
+
+ ) : (
+
+ );
+ }}
+ />
+