This is a migrated thread and some comments may be shown as answers.

localize a textbox

2 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 29 Oct 2009, 09:36 AM
Hi,
I need to localize my reports for Swedish and English.
I have read the article: http://www.telerik.com/help/reporting/advanced-localizing-reports.html but I don't understand how for example the column "Birth date" know what field in the resx file to pick.

If I have for example name/value pair in resx file:
Label_BirthDate     "Birth date"

Then I need to set Label_BirthDate on the textbox in the report, right? So, how do I do that?

Regards,
Mattias

2 Answers, 1 is accepted

Sort by
0
Mattias
Top achievements
Rank 1
answered on 29 Oct 2009, 01:32 PM
I was able to like this:
 private void OnePagerReport_NeedDataSource(object sender, EventArgs e) 
      Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender; 
 
      Service service = new Service(); 
      Improvement improvement = service.GetById(2); 
 
      report.DataSource = improvement; 
 
      textBoxClient.Value = (string)HttpContext.GetGlobalResourceObject("resources""Label_Client"); 

Is this the correct way to go?
Is it possible to set the value in design view instead of code behind?


0
Steve
Telerik team
answered on 29 Oct 2009, 04:07 PM
Hello Mattias,

When you set the Localizable and Language properties, Visual Studio would create a separate .resx file according to the culture you've set - you need to translate the text in that .resx file. When a user runs your app and it detects that his localization is of the specified culture, it would use that .resx file. As stated in the help article you've referenced Telerik Reporting uses a similar methodology for localization as Visual Studio uses for Windows Forms, so you can check out MSDN for more info.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Mattias
Top achievements
Rank 1
Answers by
Mattias
Top achievements
Rank 1
Steve
Telerik team
Share this question
or