Choice,
capitalizeFirstLetter,
communityToChoice,
- debounce,
elementUrl,
emDash,
enableNsfw,
fetchCommunities,
fetchThemeList,
fetchUsers,
- getLanguages,
myAuth,
myAuthRequired,
personToChoice,
updateCommunityBlock,
updatePersonBlock,
} from "../../utils";
+import { debounce } from "../../utils/helpers/debounce";
import { HtmlTags } from "../common/html-tags";
import { Icon, Spinner } from "../common/icon";
import { ImageUploadForm } from "../common/image-upload-form";
}
handleInterfaceLangChange(i: Settings, event: any) {
+ const newLang = event.target.value ?? "browser";
+ i18n.changeLanguage(newLang === "browser" ? navigator.languages : newLang);
+
i.setState(
s => ((s.saveUserSettingsForm.interface_language = event.target.value), s)
);
- i18n.changeLanguage(
- getLanguages(i.state.saveUserSettingsForm.interface_language).at(0)
- );
}
handleDiscussionLanguageChange(val: number[]) {