feat(localization): expand language support and enhance UI for user settings

- Added support for additional UI locales including Cebuano and Spanish, improving accessibility for a broader user base.
- Updated language selection components in the AppHeader and SettingsWidget to reflect new language options, enhancing user experience.
- Enhanced localization of various UI elements across components, ensuring consistent language representation and improved user engagement.
- Implemented logic to synchronize user language preferences with backend settings, providing a seamless experience when changing languages.
This commit is contained in:
Torsten Schulz (local)
2026-04-02 07:54:44 +02:00
parent 6e1fe6f3a8
commit c50a6b3c35
72 changed files with 1792 additions and 343 deletions

View File

@@ -30,21 +30,32 @@ export default {
fallbackText() {
if (this.data == null) return '';
if (Array.isArray(this.data)) {
return this.data.length === 0 ? 'Keine Einträge' : `(${this.data.length} Einträge)`;
return this.data.length === 0
? this.$t('widgets.list.noEntries')
: this.$t('widgets.list.entriesCount', { count: this.data.length });
}
if (typeof this.data === 'object') {
const keys = Object.keys(this.data);
return keys.length === 0 ? '—' : `(${keys.length} Felder)`;
return keys.length === 0 ? '—' : this.$t('widgets.list.fieldsCount', { count: keys.length });
}
return String(this.data);
}
},
methods: {
getDateLocale() {
const locale = this.$i18n?.locale;
return {
de: 'de-DE',
en: 'en-GB',
es: 'es-ES',
ceb: 'fil-PH'
}[locale] || 'de-DE';
},
formatDatum(dateStr) {
if (!dateStr) return '';
const d = new Date(dateStr);
if (Number.isNaN(d.getTime())) return String(dateStr);
return d.toLocaleDateString('de-DE', {
return d.toLocaleDateString(this.getDateLocale(), {
weekday: 'short',
day: 'numeric',
month: 'short',