Localization issue

Stimulsoft Reports.JS discussion
Post Reply
hbasaraner
Posts: 4
Joined: Tue Apr 30, 2024 5:24 am

Localization issue

Post 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;
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Localization issue

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply