Skip to content

Commit

Permalink
feat: dir and lang to html attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Jan 20, 2024
1 parent fc9ac0a commit 35c88c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ const { locale } = useI18n()
colorMode.preference = $settings.theme || 'system'
locale.value = $settings.lang
const i18nHead = useLocaleHead({
addDirAttribute: true,
identifierAttribute: 'id',
})
useHead({
title: $settings.title,
htmlAttrs: {
lang: i18nHead.value.htmlAttrs?.lang,
dir: i18nHead.value.htmlAttrs?.dir,
},
bodyAttrs: {
class: 'relative',
},
Expand Down

0 comments on commit 35c88c1

Please sign in to comment.