feat: Add i18n configuration for Thai and English locales and introduce a language switcher component.
This commit is contained in:
parent
38137f62c1
commit
01978f9438
2 changed files with 42 additions and 11 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue