0

I have sharepoint application, that needs to be made support Globalization(multi language support). I am planning have a drop down box with list of languages.

Problem: By Default the CurrentCulture is en-US as expected.Lets say the if user choose some other language(chinese) from the dropbox then I need to set CurrentCulture to chinese so that it can access corresponding resource xml file.

I tried overriding the currentculture based on user selection.But it is not getting effected for all the threads.

I tried setting in web.config even that it don't work.

Please suggest how to change the CurrentCulture and CurrentUICulture for entire application(threads) based on user selected language.

Regards, Archu

Archu
  • 25
  • 4

1 Answers1

0

Have you tried doing it the Sharepoint way:

http://www.denisstadler.com/sharepoint-2010/sharepoint-2010-publishing-feature/set-up-multilingual-support-in-sharepoint-2010/

If you really need to have control on the culture of the thread you can set them like this:

System.Threading.Thread.CurrentThread.CurrentUICulture = 
    New CultureInfo("de")
System.Threading.Thread.CurrentThread.CurrentCulture = 
    New CultureInfo("de-DE")

But only of you are spawning the threads yourself.

Luis
  • 5,979
  • 2
  • 31
  • 51
  • I tried setting is pro grammatically, the way you mentioned above.Again it will reset to default one. – Archu Jul 16 '13 at 17:24
  • You need to set it in each thread you are spawning. Sharepoint internal processes will get localisation from the site collection settings, web application settings etc – Luis Jul 17 '13 at 14:21