I would like to implement localization where users could be able to choose website language with the image buttons. Our requirements are as follows:
1. we have english and german versions, english is default
2. first time visitors got the version according to their client brower settings
3. if the user chooses the language, peristent cookie is set. When he or she returns, the language version is selected according to the cookie. If the cookie does not exist anymore, the language version is detected from the client browser settings.
I have a working solution in asp.net 2008, including master pages, but it does not work in Sitefinity.
I enabled localized versions in web.config:
<localization defaultProvider="Sitefinity" persistenceMode="PathPrefix" defaultCulture="en
" cultures="en, de
and it works fine.
Then I added two command buttons to the master page that sets language cookies and cookie checking into Global.asax's method Application_BeginRequest. The procedure alters System.Threading.Thread.CurrentThread.CurrentCulture according to cookie setting. I also added label to the master template's Form_Load event that checks for CurrentCulture in current thread:
The Culture in label lbl1 works correct (according to buttons), but Sitefinity continues to renders English version, even if CurrentThread.CurrentCulture displayed in label is German. I have read in the forum that default language settings in the client browser overrides defaultCulture definition in the application web.config. The client browser setting is overrided with CreateSpecificCulture. So it should work... What am I missing here?
Thank you in advance,