feat: cleanup locale conf and add some RTL stuff (#564)

This commit is contained in:
Joaquín Sánchez 2022-12-27 22:04:52 +01:00 committed by GitHub
parent 29b7cb3838
commit 6412127283
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 47 additions and 17 deletions

View file

@ -33,14 +33,14 @@ export function setupPageHeader() {
}
const localeMap = (i18n.locales.value as LocaleObject[]).reduce((acc, l) => {
acc[l.code!] = l.dir ?? 'ltr'
acc[l.code!] = l.dir ?? 'auto'
return acc
}, {} as Record<string, Directions>)
useHeadFixed({
htmlAttrs: {
lang: () => i18n.locale.value,
dir: () => localeMap[i18n.locale.value] ?? 'ltr',
dir: () => localeMap[i18n.locale.value] ?? 'auto',
},
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${isDev ? ' (dev)' : isPreview ? ' (preview)' : ''}`,
link,