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