Class ViewComponentExtensions
Contains extension methods for the ViewComponent class to retrieve culture and language information from the current ViewContext.
Inherited Members
Namespace: DataWeb.Mvc
Assembly: DataWeb.Core.dll
Syntax
public static class ViewComponentExtensions
Methods
GetCulture(ViewComponent)
Returns the culture value from the current ViewContext of the specified component.
Declaration
public static string GetCulture(this ViewComponent component)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewComponent | component | The ViewComponent instance. |
Returns
| Type | Description |
|---|---|
| string | The culture value as a string". |
GetLanguage(ViewComponent)
Returns the language value from the current ViewContext of the specified component.
Declaration
public static string GetLanguage(this ViewComponent component)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewComponent | component | The ViewComponent instance. |
Returns
| Type | Description |
|---|---|
| string | The language value as a string. |