Skip to content

Commit

Permalink
fixed System Default language
Browse files Browse the repository at this point in the history
  • Loading branch information
lelemm committed Jan 22, 2025
1 parent b6078c1 commit a11ae36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/desktop-client/src/hooks/useLocale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { useGlobalPref } from './useGlobalPref';

export function useLocale() {
const [language] = useGlobalPref('language');
const locale = useMemo(() => getLocale(language ?? 'en-US'), [language]);
const locale = useMemo(
() => getLocale(language ?? navigator.language ?? 'en-US'),
[language],
);
return locale;
}

0 comments on commit a11ae36

Please sign in to comment.