feat: Add i18n configuration for Thai and English locales and introduce a language switcher component.

This commit is contained in:
supalerk-ar66 2026-01-19 16:25:26 +07:00
parent 38137f62c1
commit 01978f9438
2 changed files with 42 additions and 11 deletions

View file

@ -7,11 +7,11 @@ export default defineNuxtConfig({
i18n: {
strategy: 'no_prefix',
defaultLocale: 'th',
langDir: 'locales',
locales: [
{ code: 'th', name: 'ไทย', iso: 'th-TH' },
{ code: 'en', name: 'English', iso: 'en-US' }
{ code: 'th', name: 'ไทย', iso: 'th-TH', file: 'th.json' },
{ code: 'en', name: 'English', iso: 'en-US', file: 'en.json' }
],
vueI18n: './i18n.config.ts',
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_redirected',