Page 1 of 1

Localization issue

Posted: Thu Jun 06, 2024 6:39 am
by hbasaraner
Hello. I get an error while I adding localization file on loading. Here is the thrown error:

Code: Select all

TypeError: Cannot read properties of undefined (reading '@language')
And here is my code to reproduce the error:

Code: Select all

"use client";

import { useEffect } from "react";
import { Stimulsoft } from "stimulsoft-reports-js/Scripts/stimulsoft.designer";

const TemplateGenerator = () => {
  useEffect(() => {
    Stimulsoft.Base.StiLicense.key =
      process.env.NEXT_PUBLIC_STIMULSOFT_LICENSE_KEY || "";

    Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile(
      "/stimulsoft-localization/tr.xml",
      true,
    );

    var options = new Stimulsoft.Designer.StiDesignerOptions();
    options.appearance.fullScreenMode = true;
    options.appearance.showLocalization = true;
    options.appearance.theme =
      Stimulsoft.Designer.StiDesignerTheme.Office2022WhiteBlue;
    options.height = "calc(100% - 1px)";

    var designer = new Stimulsoft.Designer.StiDesigner(
      options,
      "StiDesigner",
      false,
    );

    designer.renderHtml("designer");
  }, []);
  return <div id="designer" className="h-full w-full"></div>;
};

export default TemplateGenerator;

Re: Localization issue

Posted: Thu Jun 06, 2024 7:26 am
by Lech Kulikowski
Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.