Created
January 19, 2016 17:03
-
-
Save mskutta/3c9897957b9e6cece72e to your computer and use it in GitHub Desktop.
Performing Language Fallback to English if the context language does not exist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GeneralController : GlassController | |
{ | |
public ActionResult Content() | |
{ | |
var english = LanguageManager.GetLanguage("en"); | |
using (new LanguageItemFallback(english)) | |
{ | |
var model = GetContextItem<IContent>(inferType:true); | |
return View(model); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment