Permalink
Browse files

removed ITextResource from NancyViewBase and added property to HtmlHe…

…lpers that exposes CurrentLocale
  • Loading branch information...
1 parent e689f67 commit 2e819809dbd296eac6137dd0779056db1ef40891 @jchannon jchannon committed Dec 20, 2012
@@ -4,5 +4,5 @@
Layout = "razor-layout.cshtml";
}
-<h1>You're here based on your default culture</h1>
+<h1>You're here based on your default culture which is @Html.CurrentLocale </h1>
@@ -94,5 +94,10 @@ public IHtmlString AntiForgeryToken()
return new NonEncodedHtmlString(String.Format("<input type=\"hidden\" name=\"{0}\" value=\"{1}\"/>", tokenKeyValue.Key, tokenKeyValue.Value));
}
+
+ public string CurrentLocale
+ {
+ get { return this.RenderContext.Context.Culture.Name; }
+ }
}
}
@@ -83,8 +83,6 @@ public bool HasLayout
/// </summary>
public dynamic Text { get; set; }
- public ITextResource TextResource { get; set; }
-
/// <summary>
/// Initializes the specified engine.
/// </summary>

0 comments on commit 2e81980

Please sign in to comment.