George
Master
Posted
on Mar 11, 2010
(permalink)
Hi there,
I have used the localization inside sitefinity for my website with persistenceMode="PathPrefix". However I have only two languages and in my master page i have a Hyperlink that shows the name of the other language available, let's say i'm in the English version so i have think Hyperlink on the top of my master page saying "Italian". What i want to do is to be able to change the language through code instead of using the Language bar that's shipped with Sitefinity because i only have these two languages.
Another problem that i'm having is that i have couple of links on my master page that redirects to external pages [I have added these pages to sitefinity and set the external link]. When i'm in the italian version and i click on one of these links in the master page, i'm redirected to the default version which is english while i should be redirected to the italian version of this page i.e. Contact us [Contact us is a custom form that i have created as external page in visual studio]
Appreciate your help in advance.
Best Regards,
G
Reply
George
Master
Posted
on Mar 11, 2010
(permalink)
One more thing, i have tried to set the culture for the current thread and as i understood from the different topics that i have read is that i somehow need to set the culture for the CmsHttpModule
Thanks
Reply
Answer
Radoslav Georgiev
Radoslav Georgiev
Posted
on Mar 12, 2010
(permalink)
Hi G-force,
Thank you for using our services.
The language drop down control which we provide within Sitefinity is populated only by the languages you have enabled in your web.config. In order to set the culture manually you should change the CurrentThread.CurrentCulture setting and redirect to the same page with reworked URL so that the new language is in the path prefix. Bellow is sample how to change the current thread's culture:
Best wishes,
Radoslav Georgiev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.
Reply
George
Master
Posted
on Mar 13, 2010
(permalink)
Thank you !
Reply