Skip to content

Commit

Permalink
i18n: Make captions autodetect text direction (#2540)
Browse files Browse the repository at this point in the history
This uses browser mechanism for detecting appropiate direction for text, dir=auto.
  • Loading branch information
ebraminio committed Nov 17, 2022
1 parent aba00d0 commit 6a62e3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/captions.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const captions = {
// Inject the container
if (!is.element(this.elements.captions)) {
this.elements.captions = createElement('div', getAttributesFromSelector(this.config.selectors.captions));
this.elements.captions.setAttribute('dir', 'auto');

insertAfter(this.elements.captions, this.elements.wrapper);
}
Expand Down

0 comments on commit 6a62e3d

Please sign in to comment.