C# Class Framework.Mvc.Extensions.ResourcesExtensions

Extends HtmlHelper functionality to provide views localization.
显示文件 Open project: coreframework/Core-Framework

Public Methods

Method Description
PartialWithScope ( this html, String partialViewName ) : System.Web.Mvc.MvcHtmlString

Renders the specified partial view as an HTML-encoded String with specific localization scope.

Translate ( this html, String key ) : String

Gets global resource for key specified using default scope ({AreaName}.Views.{ControllerName}.{ViewName}).

Translate ( this httpContext, String key, IEnumerable scope ) : String

Gets global resource for key and scope specified.

Translate ( this httpContext, String key, String scope ) : String

Gets global resource for key and scope specified.

Private Methods

Method Description
DefaultTranslationMissing ( String resourceKey, String scope, String culture ) : String

Method Details

PartialWithScope() public static method

Renders the specified partial view as an HTML-encoded String with specific localization scope.
public static PartialWithScope ( this html, String partialViewName ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
partialViewName String The name of the partial view to render.
return System.Web.Mvc.MvcHtmlString

Translate() public static method

Gets global resource for key specified using default scope ({AreaName}.Views.{ControllerName}.{ViewName}).
public static Translate ( this html, String key ) : String
html this The HTML helper instance that this method extends.
key String The resource key.
return String

Translate() public static method

Gets global resource for key and scope specified.
public static Translate ( this httpContext, String key, IEnumerable scope ) : String
httpContext this The http context instance that this method extends.
key String The resource key.
scope IEnumerable The resource scope.
return String

Translate() public static method

Gets global resource for key and scope specified.
public static Translate ( this httpContext, String key, String scope ) : String
httpContext this The http context instance that this method extends.
key String The resource key.
scope String The resource scope.
return String