Page 1 of 1
How localize tooltip using GlobalizationManager
Posted: Thu Apr 24, 2014 2:08 pm
by Saus86
Hi,
I am using GlobalizationManager with File resx and Globalization Strings Editor inside my report.
I have seen that with the Globalization Strings Editor i can localize not only ".Text" of StiText but also the properties "Hyperlink", ".Tag" and ".Tooltip".
I want localize tooltip using an external file.resx and not using Globalization Editor of the report.
Is possible localize tooltip using GlobalizationManager?
For example i can set a GlobalizedName at the tooltip of a Stitext??
Thank you.
Re: How localize tooltip using GlobalizationManager
Posted: Thu Apr 24, 2014 5:31 pm
by Saus86
I have another questions.
1)
I m not finding the way for localize (with GlobalizationManager or with GlobalizationString editor) the elements (textbox, label ...) inside the Form. The property GlobalizationName is not present in list Properties, and this objects are not included neither in Globalization Editor.
If it's not possible can you advise me the alternative way??
2)
If i set Globalilzed Name in some StiText of my report Page, and run Preview from the ReportDesigner in this fields i view the values of my Globalized Name.
Re: How localize tooltip using GlobalizationManager
Posted: Fri Apr 25, 2014 12:11 pm
by HighAley
Hello.
Unfortunately, the globalization of the Form is not possible and we have no plan to add this feature.
It's impossible to globalize tooltips with GlobalizationManager.
Thank you.
Re: How localize tooltip using GlobalizationManager
Posted: Fri Apr 25, 2014 12:55 pm
by Saus86
About 2nd question,
"If i set Globalilzed Name in some StiText of my report Page, and run Preview from the ReportDesigner in this fields i view the values of my Globalized Name"
Is possibile ignore Globalized Names when i launch Preview from ReportDesigner? So i can print in fields globalized, the expression and not the GlobalizedName.
Re: How localize tooltip using GlobalizationManager
Posted: Fri Apr 25, 2014 1:19 pm
by HighAley
Hello.
It's possible if you don't set the GlobalizationManager of the report. Otherwise the Globalized name will be always used.
Thank you.
Re: How localize tooltip using GlobalizationManager
Posted: Sat Apr 26, 2014 12:24 pm
by Saus86
I have found the solution for globalize object in Form of the report.
In this way it possible globalize all tooltip inside to the report without using GlobalizationString Editor but with file resx.
event FormLoad:
Code: Select all
//send parameter cultureName from external application
if(this["cultureName"] != null)
{
string cultureName=""+this["cultureName"];
//RETRIEVAL RESX USING RESOURCE MANAGER
// Gets a reference to a different assembly.
System.Reflection.Assembly myAssembly1 = System.Reflection.Assembly.Load("GlobalizedReport");
//Creates the ResourceManager.
System.Resources.ResourceManager myManager = new
System.Resources.ResourceManager("GlobalizedReport.MyResources", myAssembly1);
//Retrieves String and Image resources.
System.String myString;
System.Drawing.Image myImage;
//READ VALUE OF NameString OF FILE RESX
myString = myManager.GetString("KeyCustomer", new System.Globalization.CultureInfo(cultureName));
//myImage = (System.Drawing.Image)myManager.GetObject("Flag", new CultureInfo(cultureName));
LabelControl1.Text = myString;
}
I post it so it can be useful for others users.
Thank you.
Re: How localize tooltip using GlobalizationManager
Posted: Mon Apr 28, 2014 8:30 am
by HighAley
Hello.
Thank you for the solution.
To avoid loading your assembly on each form load you could try to add it in the Referenced Assemblies of the report.
Thank you.
Re: How localize tooltip using GlobalizationManager
Posted: Tue Apr 29, 2014 9:16 am
by Saus86
Thak you.
I have found another best solution for globalize objects in Form.
Code: Select all
this.Label.Text = this.GlobalizationManager.GetString("NameInResx");
Same thing for event tooltip in Form and in Page.
Yeah!!!
Re: How localize tooltip using GlobalizationManager
Posted: Fri May 02, 2014 8:12 am
by Alex K.
Hello,
Thank you for the information.