1

I need to develop a button Language switcher. I have downloaded a solution from CodePlex named Togglelanguage (https://togglelanguage.codeplex.com/). This type of solution apparently works well, but when I switch the language the taxonomy term are not translated. Any ideas for how to solve this?

I want to clarify my issue. I have used the term store manager to translate my terms.

In fact when I switch the language via browser the related term in my lists are loaded in a correct language selected.

If I use the toggle solution to switch the language, all labels referenced by resources file are loaded corrected in a selected language but the terms are not.

I have an HTTPModule with

// where strLanguage contains = en-US or it-IT context.Request.Headers["Accept-Language"] = strLanguage + "," + context.Request.Headers["Accept-Language"]; var culture = new System.Globalization.CultureInfo(strLanguage); // Apply the culture..... SPUtility.SetThreadCulture(culture, culture);

And a button to switch

if (button.ID == "flagUkBtn") { //DisplayName = "Italiano"; Tag = "en-US"; //ID = "1040"; flagUkBtn.Visible = false; flagItalyBtn.Visible = true; 
} else { //DisplayName = "Inglese"; Tag = "it-IT"; //ID = "1033"; flagUkBtn.Visible = true; flagItalyBtn.Visible = false;
}  
HttpCookie acookie = new HttpCookie(strKeyName); acookie.Value = Tag; acookie.Expires = DateTime.MaxValue; Response.Cookies.Add(acookie); Response.Redirect(Request.RawUrl, false);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.