feat(i18n): add French language support and enhance localization
- Introduced French as a supported language across the application, updating locale files and adding translations for various components. - Enhanced language handling logic to accommodate French, ensuring proper detection and fallback mechanisms. - Updated UI elements to include French language options, improving accessibility for French-speaking users. - Refactored SEO handling to include French in hreflang links, enhancing search engine indexing for multilingual content. - Added new scripts for managing French translations and ensuring consistency across language files.
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import apiClient from '@/utils/axios.js';
|
||||
import { SUPPORTED_UI_LOCALES } from '@/i18n/supportedLocales.js';
|
||||
|
||||
export default {
|
||||
name: 'AppHeader',
|
||||
@@ -54,6 +55,7 @@ export default {
|
||||
{ value: 'en', nativeLabel: 'English' },
|
||||
{ value: 'ceb', nativeLabel: 'Binisaya' },
|
||||
{ value: 'es', nativeLabel: 'Español' },
|
||||
{ value: 'fr', nativeLabel: 'Français' },
|
||||
],
|
||||
};
|
||||
},
|
||||
@@ -78,8 +80,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async onUiLanguageChange(code) {
|
||||
const supported = ['de', 'en', 'ceb', 'es'];
|
||||
if (!supported.includes(code)) {
|
||||
if (!SUPPORTED_UI_LOCALES.includes(code)) {
|
||||
return;
|
||||
}
|
||||
await this.$store.dispatch('setLanguage', code);
|
||||
|
||||
Reference in New Issue
Block a user