Pages

03 April, 2017

Sitecore - Get fallback language in code

Language Fallback in Sitecore is a key feature for multilingual website. Sitecore does the job to get the fallback version and languages for us. 

If you want to get the Fallback Language object, one of the way is below.
var fallbackLanguage = Sitecore.Data.Managers.LanguageFallbackManager.GetFallbackLanguage(
                            Sitecore.Context.Language, 
                            Sitecore.Context.Database);

No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }