How to set DesinerForm's localization in code

edited 12:29AM in FastReport .NET
The "Select Language....."in the "File" Menu may set DesinerForm's localization,
how to do in code?
I try to do this, but fail, my code is

FastReport.Utils.XmlDocument xmlConfig = new FastReport.Utils.XmlDocument();            
            xmlConfig.Load(System.IO.Path.Combine(FastReport.Utils.Config.Folder, "FastReport.config")); ;
            FastReport.Utils.XmlItem xmlLan = xmlConfig.Root.FindItem("Language");
	    xmlLan.SetProp("Name", "Chinese (Simplified)");            
            xmlConfig.AutoIndent = true;
            xmlConfig.Save(System.IO.Path.Combine(FastReport.Utils.Config.Folder, "FastReport.config"));
or
FastReport.Utils.XmlItem xmlLan2 = FastReport.Utils.Config.Root.FindItem("Language");
xmlLan2.SetProp("Name", "Chinese (Simplified)");

It seems to have memory cache.

Comments

  • edited 12:29AM
    Use Res.LoadLocale method:

    // do this to ensure that FastReport config file is loaded
    using (Report report = new Report());

    // load the locale then.
    Res.LoadLocale(name_of_frl_file_including_full_path);
  • edited 12:29AM
    Tks ,it works

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.