mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
fix(language) set auto as default language (#1061)
This commit is contained in:
parent
9f201577ef
commit
b23166d6be
1 changed files with 3 additions and 1 deletions
|
|
@ -1,8 +1,10 @@
|
||||||
import { atom } from 'recoil';
|
import { atom } from 'recoil';
|
||||||
|
|
||||||
|
const userLang = navigator.language || navigator.languages[0];
|
||||||
|
|
||||||
const lang = atom({
|
const lang = atom({
|
||||||
key: 'lang',
|
key: 'lang',
|
||||||
default: localStorage.getItem('lang') || 'en-US',
|
default: localStorage.getItem('lang') || userLang,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default { lang };
|
export default { lang };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue