diff --git a/examples/starlight/lunaria.config.ts b/examples/starlight/lunaria.config.ts index b2be514..03f6803 100644 --- a/examples/starlight/lunaria.config.ts +++ b/examples/starlight/lunaria.config.ts @@ -5,8 +5,16 @@ export default defineConfig({ name: 'yanthomasdev/lunaria', rootDir: 'examples/starlight', }, - sourceLocale: 'en', - locales: ['pt'], + sourceLocale: { + label: 'English', + lang: 'en', + }, + locales: [ + { + label: 'Português', + lang: 'pt', + }, + ], files: [ { include: ['src/content/docs/**/*.(md|mdx)'], @@ -25,6 +33,14 @@ export default defineConfig({ }, type: 'dictionary', }, + { + include: ['src/content/i18n/en.ts'], + pattern: { + source: 'src/content/i18n/@lang.ts', + locales: 'src/content/i18n/@lang.ts', + }, + type: 'dictionary', + }, ], tracking: { localizableProperty: 'i18nReady', diff --git a/examples/starlight/src/content/i18n/en.ts b/examples/starlight/src/content/i18n/en.ts new file mode 100644 index 0000000..84038b1 --- /dev/null +++ b/examples/starlight/src/content/i18n/en.ts @@ -0,0 +1,4 @@ +export default { + one: 'one', + second: 'second', +}; diff --git a/examples/starlight/src/content/i18n/pt.ts b/examples/starlight/src/content/i18n/pt.ts new file mode 100644 index 0000000..523e19f --- /dev/null +++ b/examples/starlight/src/content/i18n/pt.ts @@ -0,0 +1,4 @@ +export default { + one: 'um', + second: 'segundo', +};