mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 10:03:28 +00:00
parent
d475153544
commit
2ff1ffcb9c
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -7558,7 +7558,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sd-core"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"aovec",
|
||||
"async-channel",
|
||||
|
@ -7697,7 +7697,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sd-desktop"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"directories 5.0.1",
|
||||
|
|
|
@ -28,8 +28,8 @@ const LANGUAGE_OPTIONS = [
|
|||
{ value: 'es', label: 'Español' },
|
||||
{ value: 'fr', label: 'Français' },
|
||||
{ value: 'tr', label: 'Türkçe' },
|
||||
{ value: 'zh-CN', label: '中文(简体)' },
|
||||
{ value: 'zh-TW', label: '中文(繁體)' }
|
||||
{ value: 'zh_CN', label: '中文(简体)' },
|
||||
{ value: 'zh_TW', label: '中文(繁體)' }
|
||||
];
|
||||
|
||||
export const Component = () => {
|
||||
|
@ -201,8 +201,8 @@ export const Component = () => {
|
|||
<Select
|
||||
value={i18n.language}
|
||||
onChange={(e) => {
|
||||
// add "i18nextLng" key to localStorage and set it to the selected language
|
||||
i18n.changeLanguage(e);
|
||||
// add "i18nextLng" key to localStorage and set it to the selected language
|
||||
localStorage.setItem('i18nextLng', e);
|
||||
}}
|
||||
containerClassName="h-[30px] whitespace-nowrap"
|
||||
|
|
|
@ -13,8 +13,14 @@ i18n
|
|||
// for all options read: https://www.i18next.com/overview/configuration-options
|
||||
.init({
|
||||
resources,
|
||||
load: 'languageOnly',
|
||||
detection: {
|
||||
// We need to convert due to ES syntactical rules (e.g. ch-TW -> ch_TW) and vite's virtual module stuff -_-
|
||||
// NOTE: This whole issue sounds very error-prone...
|
||||
convertDetectedLanguage: (lng) => lng.replace('-', '_')
|
||||
},
|
||||
// debug: true,
|
||||
fallbackLng: 'en',
|
||||
nonExplicitSupportedLngs: true,
|
||||
ns: ['common'],
|
||||
fallbackNS: 'common',
|
||||
defaultNS: 'common'
|
||||
|
|
Loading…
Reference in a new issue