Skip to content

Commit

Permalink
Fix Issue #1082 added lang attribute for language specific pronunciat…
Browse files Browse the repository at this point in the history
…ion (#1173)

- lang attribute added to parent div of all UV elements which should cascade down
  • Loading branch information
thattonBL authored Dec 6, 2024
1 parent 3fc6ba7 commit 22f81e5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
Urls,
Strings,
} from "@edsilv/utils";
import { isVisible } from "../../../../Utils";
import { defaultLocale, isVisible } from "../../../../Utils";
import { IIIFEvents } from "../../IIIFEvents";
import { Events } from "../../../../Events";
import { StoreApi } from "zustand/vanilla";
Expand Down Expand Up @@ -110,6 +110,9 @@ export class BaseExtension<T extends BaseConfig> implements IExtension {
this.$element.addClass("loading");
if (this.data.locales) {
this.$element.addClass(this.data.locales[0].name.toLowerCase());
this.$element.prop("lang", this.data.locales[0].name.substring(0,2));
} else {
this.$element.prop("lang", defaultLocale[0].name.substring(0,2));
}

if (this.isRightPanelEnabled()) {
Expand Down

0 comments on commit 22f81e5

Please sign in to comment.