Bug reports Found a bug? Post it here please.
Version 5.x > Bug reports > DidYouMean webpart View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
emanuele.firmani-aduno-gruppe - 5/21/2010 6:14:23 AM
   
DidYouMean webpart
I'm using the DidYouMean webpart within the smart search feature.
I'm using 4 culture for my website: de-CH, en-GB, fr-fr, it-it. The webpart works great for all of them but the first one. If I set manually the culture with the following code

if(CultureCode.ToLower() == "de-ch")
CultureCode = "de-de";

it works.
How can I resolve this issue? Is it possible to change the site culture in use from "de-ch" to "de-de" without losing the content I've already inserted?

I found also a bug: you're using the following code to define the culture to be used

string currentCulture = String.IsNullOrEmpty(Language.Trim()) ? CMSContext.PreferredCultureCode : Language;

Instead of it, you should use the following

string currentCulture = String.IsNullOrEmpty(Language.Trim()) ? CMSContext.CurrentDocumentCulture.CultureCode : Language;

otherwise, if I don't set the Language property, I'll get the preferred culture, not the current one.

Many thanks
Regards
Emanuele Firmani

User avatar
Kentico Support
Kentico Support
kentico_radekm - 6/9/2010 12:44:37 PM
   
RE:DidYouMean webpart
Hello.

The reason why DidYouMean web part does not work for de-CH culture can be, that you do not have a dictionary for it. If you take a look into <project folder> / App_Data / Dictionaries, you will find files for 10 cultures. en-GB, fr-fr, it-it are here, but de-CH is not. The reason why it works if you change culture code to de-de is, that dictionary for this culture is available.

So, to get it work with de-CH culture version, you would need to use appropriate dictionary in <project folder> / App_Data / Dictionaries folder.

Best Regards,
Radek Macalik

User avatar
Certified Developer v7
Certified  Developer v7
emanuele.firmani-aduno-gruppe - 6/10/2010 1:08:30 AM
   
RE:DidYouMean webpart
I created a copy of the dictionary and renamed it to de-CH: now it works.

Thanks
Regards
Emanuele Firmani