From 35c88c1b38ad5912c345d2aae9c05147a47620bd Mon Sep 17 00:00:00 2001 From: hywax Date: Sun, 21 Jan 2024 00:41:42 +0500 Subject: [PATCH] feat: dir and lang to html attrs --- app.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app.vue b/app.vue index d31200d..36d2b29 100644 --- a/app.vue +++ b/app.vue @@ -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', },