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

Localization for RadUpload

3 Answers 56 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 27 May 2010, 02:29 AM
I've been searching all day on how to change the localization for a radupload based on the browser language in a silverlight application with no luck.

If I've got a silverlight app with only a radupload control being put onto an asp.net page. How do I make it so that it will grab the current language from the web browser? I've got a bunch of other asp.net controls working by using resx files, but I cannot get this silverlight app to work for the life of me.

I'd like to have the language data in a resx file that's loaded just like the asp.net section.

Is there a way to do this? help.

Thanks in advance

3 Answers, 1 is accepted

Sort by
0
Dave
Top achievements
Rank 1
answered on 27 May 2010, 04:53 AM
Ok,

so I finally managed to find what I was looking for in a tutorial, but I'm not sure how to modify this to utilize different languages dependant on the browser language. 

any ideas?

0
Dave
Top achievements
Rank 1
answered on 27 May 2010, 05:16 AM
so using this link, I now have an english resx and a german resx.

http://www.telerik.com/help/silverlight/common-localization.html

Now how do I get the silverlight application to switch the language files. Switching the language in the web browser isn't doing it for me.
0
Dave
Top achievements
Rank 1
answered on 27 May 2010, 07:18 PM
What I ended up doing was to pass a parameter to silverlight that contained System.Threading.Thread.CurrentThread.CurrentUICulture.ToString()

Then, I used the following bit to adjust the language to the incoming parameter

String

 

 

strLanguage = properties.Language;

 

 

 

LocalizationManager.Manager = new LocalizationManager();

 

 

 

LocalizationManager.Manager.Culture = new System.Globalization.CultureInfo(strLanguage);

 

 

 

LocalizationManager.Manager.ResourceManager = FileUploader.ResourceManager;

wham bam works like a charm.

 

Tags
Upload
Asked by
Dave
Top achievements
Rank 1
Answers by
Dave
Top achievements
Rank 1
Share this question
or