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:
@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user