@autobusal/providers 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to `@autobusal/providers` are documented here. This project
4
4
  adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.4.1] - 2026-07-30
8
+
9
+ ### Fixed
10
+
11
+ - **`<html lang>` never reflected the active language (`Setup/languages.ts`).**
12
+ `index.html` hardcodes `lang="en"` at build time and nothing updated it
13
+ afterward - every one of the 15 supported languages rendered under the same
14
+ `lang` attribute, a signal both search engines and screen readers rely on.
15
+ `languages()` now sets `document.documentElement.lang` immediately on init
16
+ (using the same `localStorage`-or-default resolution as the i18next `lng`
17
+ option) and keeps it in sync via `i18next.on('languageChanged', ...)`, so it
18
+ tracks every future change regardless of what triggers it.
19
+
7
20
  ## [1.4.0] - 2026-07-30
8
21
 
9
22
  ### Added
@@ -38,6 +38,17 @@ const languages = (type: string, defaultLanguage: string): void => {
38
38
  },
39
39
  ns: type
40
40
  });
41
+
42
+ // <html lang> was otherwise hardcoded at build time (index.html) and never
43
+ // updated again - every locale of every page shared one lang attribute, a
44
+ // basic a11y/SEO signal search engines and screen readers rely on. Set it
45
+ // immediately (don't wait for the async backend fetch) and keep it in sync
46
+ // on every future change, whether triggered by ChangeLanguage or anything
47
+ // else that calls i18next.changeLanguage().
48
+ document.documentElement.lang = getLanguage(defaultLanguage);
49
+ i18next.on('languageChanged', (lng) => {
50
+ document.documentElement.lang = lng;
51
+ });
41
52
  };
42
53
 
43
54
  export default languages;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"