21 Apr 2010
22 Apr 2010
Link to this post
Wow I really thought that would fix the problem, but it didn't. I tried both of the following in the web.config:
<localization defaultProvider="Sitefinity" persistenceMode="QueryString" defaultCulture="en" cultures="en, zh-CHS" autoSetClientLanguage="False" >
<localization defaultProvider="Sitefinity" persistenceMode="PathPrefix" defaultCulture="en" allowSpecificCultures="true" autoSetClientLanguage="false" cultures="en, zh-CN, zh-CHS">
I point out both of them because in your example you had zh-CH as a culture and Sitefinity doesn't recognize it.
Also because I prefer to use querystring if possible, but at this point I'll take either.
Some back story might be helpful for you in helping me figure this out. I had turned on localization on this server at one point, but I noticed some of the templates had absolute paths, so I turned localization off. Before I turned it off everything worked correctly. It was only after I turned localization back on a second time did I notice this problem pop up. Does Sitefinity keep localization settings in a config table somewhere that I can flush? I've tried browsing in private mode, to clear the browser cache, and I've done iisresets after I change the web.config as well to help give it as clean of a setup as possible.
Two things I've seen happen that lead me to believe that Sitefinity might be caching stuff it shouldn't:
At one point yesteday when I switched from QueryString to PathPrefix (or vice versa I don't recall.) I got a url that looked like the following when I selected Chinese from the language selector:
Mind you that was after selecting Chinese.
This morning after making your suggested change I got:
Each time I select Chinese it appends a new sflang, but it always stays English.
With some work I can get it to stop doing that stuff, but it still goes back to the initial problem of not remembering the language I select from the dropdown after clicking a link.