Set default locale according to browser locale (#11805)

We didn't get much complaints on Localization so I guess we can expand
it more and make it the default behavior to use the browser's locale
when you signup

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Félix Malfait
2025-04-30 13:11:40 +02:00
committed by GitHub
parent e55ff5ac4a
commit cb513bc7a8
7 changed files with 140 additions and 18 deletions

View File

@ -59,6 +59,12 @@ export const LocalePicker = () => {
await updateWorkspaceMember({ locale: value });
await dynamicActivate(value);
try {
localStorage.setItem('locale', value);
} catch (error) {
// eslint-disable-next-line no-console
console.log('Failed to save locale to localStorage:', error);
}
await refreshObjectMetadataItems();
};