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

Text in resources and localizing

2 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 26 Nov 2009, 02:51 PM
Hello,

Is there some tool to manage Text resources localizing under RadControls for Silverlight ?

CS

2 Answers, 1 is accepted

Sort by
0
CSurieux
Top achievements
Rank 2
answered on 26 Nov 2009, 06:15 PM

I finally found samples using LocalizationManager but I am unable to have it working.
I created 2 string resource file resource.resx and resource.fr-FR.resx, set the action/tools according blog http://blogs.telerik.com/silverlightteam/posts/09-05-13/localization_for_radcontrols_for_silverlight_and_wpf.aspx
in my customcontrol ctor, I set the LocalizationManager.Manager to the resource manager and force the Culture and thread Culture to 'fr-FR', but I always get the resource english version when using in my xaml file 

                        <telerikNavigation:RadTreeViewItem Cursor="Hand" 
                                DefaultImageSrc="Images/Icons/winforms.png" 
                                Header="Winforms" telerik:LocalizationManager.ResourceKey="TEST"/>  
 

I have not understood, in the blog page, the instructions
Then, you can open the project file in a text-mode and append the code below to notify the framework about the supported cultures:

 

    <SupportedCultures>en;de;ja</SupportedCultures>
Which project file ???? is this still ok for Q309 ?

Thanks for help.
CS

0
Ivan
Telerik team
answered on 02 Dec 2009, 01:20 AM
Hi Christian,

Thank you for contacting us.

First of all let me apologize for the late response.

About the missing french UI regardless the existent french resource file.
In fact this is a bit wired case. If the localization rely on the current culture then the application have to declare which cultures are supported. Because of this you should add the supported cultures in the project file of the Silverlight application. For example you can follow the steps below:
  • Open your solution into the MSVS.
  • Open the Solution Explorer.
  • Find the project of the Silverlight application and unload it:
  • Open the project file in Text-mode:

     
  • Find / Add the SupportedCultures element and fill your cultures:

     
  • Save the project file and reload the project:

     
  • That's all. Just rebuild and run the application.

As this is not so flexible we had implemented our localization manager. Please preview the Localizing RadUpload for Silverlight with a Resource file article. In the attached example we do not care about the current thread culture - we just replace the resource manager in charge. This way we are avoiding the code about supported cultures inside the project file.

Please give it a try and let us know if you have more questions.

Greetings,
Ivan
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
CSurieux
Top achievements
Rank 2
Answers by
CSurieux
Top achievements
Rank 2
Ivan
Telerik team
Share this question
or