Set the HTML lang attribute to the appropriate language
This commit is contained in:
parent
1a0ca50647
commit
2685d0f720
3 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Changed
|
### Changed
|
||||||
- Secret keys are now restricted to 128 bits (16 bytes) or 256 bits (32 bytes)
|
- Secret keys are now restricted to 128 bits (16 bytes) or 256 bits (32 bytes)
|
||||||
- The local part cannot contain the separator
|
- The local part cannot contain the separator
|
||||||
|
- The HTML lang attribute is now set to the appropriate language
|
||||||
|
|
||||||
## [0.2.0] - 2023-08-11
|
## [0.2.0] - 2023-08-11
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ const stored_locale = useStorage('sake-locale', '');
|
||||||
if (!stored_locale.value) {
|
if (!stored_locale.value) {
|
||||||
stored_locale.value = default_locale;
|
stored_locale.value = default_locale;
|
||||||
}
|
}
|
||||||
|
document.documentElement.setAttribute('lang', stored_locale.value);
|
||||||
|
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
legacy: false,
|
legacy: false,
|
||||||
|
|
|
@ -15,6 +15,7 @@ const toMainView = () => {
|
||||||
|
|
||||||
watch(locale, async (newLocale) => {
|
watch(locale, async (newLocale) => {
|
||||||
stored_locale.value = newLocale;
|
stored_locale.value = newLocale;
|
||||||
|
document.documentElement.setAttribute('lang', newLocale);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue