Skip to content

Commit

Permalink
feat: support currentLocale site config
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Sep 9, 2023
1 parent 807f774 commit 47b2fc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/src/runtime/plugin/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default defineNuxtPlugin({
useServerHead({
templateParams: { site: { name: siteConfig.name, url: siteConfig.url }, separator: siteConfig.titleSeparator },
// TODO integrate with nuxt/i18n
htmlAttrs: { lang: siteConfig.deaultLocale },
htmlAttrs: { lang: () => siteConfig?.currentLocale },
titleTemplate: '%s %separator %site.name',
})

Expand Down Expand Up @@ -79,7 +79,7 @@ export default defineNuxtPlugin({
defineWebSite({
name: () => siteConfig?.name || '',
// TODO integrate with nuxt/i18n
inLanguage: () => siteConfig?.defaultLocale || '',
inLanguage: () => siteConfig?.currentLocale || '',
description: () => siteConfig?.description || '',
}),
defineWebPage(),
Expand Down

0 comments on commit 47b2fc5

Please sign in to comment.