ngx-xtroedge-cms 1.3.6 → 1.3.7

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/dist/index.mjs CHANGED
@@ -1668,12 +1668,14 @@ var XtroedgeCMS = class _XtroedgeCMS {
1668
1668
  }
1669
1669
  switchLang(lang) {
1670
1670
  this.currentLang = lang;
1671
- document.documentElement.setAttribute("lang", lang);
1671
+ const html = document.documentElement;
1672
+ html.setAttribute("lang", lang);
1673
+ html.setAttribute("dir", lang === "ar" ? "rtl" : "ltr");
1672
1674
  localStorage.setItem("selectedLanguage", lang);
1673
- window.dispatchEvent(new CustomEvent("cms:langChanged", { detail: { lang } }));
1674
1675
  this.updateElementTexts();
1675
1676
  this.buildLangButtons();
1676
1677
  this.updateUI();
1678
+ window.dispatchEvent(new CustomEvent("cms:langChanged", { detail: { lang } }));
1677
1679
  this.config.onLangChanged?.(lang);
1678
1680
  }
1679
1681
  // ===============================================