Sitecore enforcing pages to one language

Go To StackoverFlow.com

0

So I have section of the site where I want all my user to go to US version of page, because we dont have translations yet for all the languages.

How could I send all the users of different languages to US version ? For every language version we have language in URL ie..

us/pagename mx/pagename ca/pagename

2012-04-04 21:46
by StevieB


2

Would language fallback solve this problem for you? You have two options:

  • Use the Fallback module which falls back to another language if an item doesn't exist in a version
  • Use the "partial" language fallback module, which will fall back data fields that aren't populated to another language. In this case, you just need to create an empty language version in each target language.

http://trac.sitecore.net/LanguageFallback

2012-04-04 22:10
by techphoria414


0

I like the idea of the Language Fallback Provider, which basically makes any field that doesn't have a value in a certain language, fallback to another (e.g. English).

Another option is to create a custom HttpRequest pipeline processor near the LanguageResolver to look for items in that section of the site and resolve English for them:

  1. Create a class that inherits from HttpRequestProcessor
  2. Implement public override void Process(HttpRequestArgs args) with code to check if you're in that section of the site, and if so, set the Context.Language to English.

This is just an idea, I have not tried it. If you want to see how the current LanguageResolver works, decompile Sitecore.Kernel with ILSpy and look at Sitecore.Pipelines.HttpRequest.LanguageResolver

2012-04-05 01:31
by Mark Ursino
Ads