0

If I have an item in en-US and I want to link to the same item in zh-CN culture from the en-US version in the rich text editor, how can I accomplish that? Also, how will the context language/culture be affected?

Thanks

Martijn van der Put
  • 4,062
  • 1
  • 18
  • 26
Gabbar
  • 4,006
  • 7
  • 41
  • 78

1 Answers1

0

You can use the ?sc_lang=cn querystring parameter to change the language of the current page. I'm not sure if cn is the language code for Chinese ;)

That is the easiest way, but you can also use the embedded language paths if you set up your LinkManager to use it. You then need to set the urlOptions.LanguageEmbedding = LanguageEmbedding.Always and when creating a link, you can use the options.Language set to the desired language. Your url wil then be like http://www.yoursite.com/en/itemname where /en/ is the code of the selected language.

Martijn van der Put
  • 4,062
  • 1
  • 18
  • 26
  • I'm not entirely sure on his question since it is not clear to me, but the second part, adding in the query string parameter will cause his context language to be changed to zh-CN. – jammykam Feb 07 '13 at 04:54