generated from Seekra/repository-template
Feat(i18n): make language a setting #185
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2026 Seekra
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const LANGUAGE_PATH = ['general', 'language'];
|
||||||
@@ -14,8 +14,26 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { fallbackLocale, SUPPORTED_LANGUAGES } from '@/i18n';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
contents: [
|
contents: [
|
||||||
|
{
|
||||||
|
name: 'general',
|
||||||
|
i18n: 'settings.settings.general.title',
|
||||||
|
content: [
|
||||||
|
{
|
||||||
|
name: 'language',
|
||||||
|
type: 'selection',
|
||||||
|
i18n: 'settings.settings.general.settings.language.title',
|
||||||
|
default: fallbackLocale,
|
||||||
|
options: SUPPORTED_LANGUAGES.map((language) => ({
|
||||||
|
name: language,
|
||||||
|
i18n: `preferences.locale.languages.${language}`
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'appearance',
|
name: 'appearance',
|
||||||
i18n: 'settings.settings.appearance.title',
|
i18n: 'settings.settings.appearance.title',
|
||||||
|
|||||||
@@ -74,6 +74,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"general": {
|
||||||
|
"title": "Allgemein",
|
||||||
|
"settings": {
|
||||||
|
"language": {
|
||||||
|
"title": "Sprache"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -74,6 +74,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"general": {
|
||||||
|
"title": "General",
|
||||||
|
"settings": {
|
||||||
|
"language": {
|
||||||
|
"title": "Language"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user