Hello.
Is there a way to select in my view the initial localization of the Reports Designer?
I see there is a `LocalizationDirectory` property, but nothing specific that may help me select a language when the designer gets loaded.
It seems that it is searching for the "en.xml" by default.
I found out that I can choose a localization in the GetLocalization() action, but I don't think I can distinquise the user-requests for language-change from the automated ones when the designer first loads.
I want both the user to be able to change the language and set the initial defalt language myself on the server.
Can I do that?
Thanks,
Kostas
Choosing localization for the ASP MVC Designer
Re: Choosing localization for the ASP MVC Designer
Hello.
To let users to change localization you should set next property:
You could also read how to localize Designer from code on the next article on the Stimulsoft User Manual.
Thank you.
To let users to change localization you should set next property:
Code: Select all
LocalizationDirectory = Server.MapPath("~/Content/Localization/")
Thank you.
Re: Choosing localization for the ASP MVC Designer
Hello.
I know about GetLocalization(), but I don't know how/if I can understand from within GetLocalization() if the request comes form the user deciding to change the language or from the designer initialization.
Here is my code:
As far as I see, `StiMvcDesigner.GetLocalizationName(this.Request)` always return non-null.
So, I can't understand if I should use my default culture or the one provided by it.
Perhaps there is a way to specify the default localization returned by GetLocalizationName ?
Basically, I try to combine the two controller actions given in your documentation:
http://www.stimulsoft.com/en/documentat ... signer.htm
I know about GetLocalization(), but I don't know how/if I can understand from within GetLocalization() if the request comes form the user deciding to change the language or from the designer initialization.
Here is my code:
Code: Select all
public ActionResult GetLocalization()
{
// Load the localization file requested by the designer
string name = StiMvcDesigner.GetLocalizationName(this.Request);
string path = Server.MapPath("~/Content/ReportsModule/ReportsLocalization/");
if(!System.IO.File.Exists(Path.Combine(path, name)))
{
var ci = Thread.CurrentThread.CurrentCulture;
name = ci.Name + ".xml";
}
return StiMvcDesigner.GetLocalizationResult(Path.Combine(path, name));
}
So, I can't understand if I should use my default culture or the one provided by it.
Perhaps there is a way to specify the default localization returned by GetLocalizationName ?
Basically, I try to combine the two controller actions given in your documentation:
http://www.stimulsoft.com/en/documentat ... signer.htm
Re: Choosing localization for the ASP MVC Designer
Hello,
We have added a new Localization property, which allows you to force a default localization. Update will be available in the next prerelease build this week.
Thank you.
We have added a new Localization property, which allows you to force a default localization. Update will be available in the next prerelease build this week.
Thank you.