Метод | Описание | |
---|---|---|
ClearResources ( ) : void |
Clears resources from memory and forces reloading of all ResourceSets. Effectively unloads the ResourceManager and ResourceProvider.
|
|
DeleteResource ( string resourceId, string resourceSet = null, string lang = null ) : bool |
Deletes a resource entry
|
|
GetResourceManager ( string resourceSet ) : |
Returns an instance of a DbResourceManager
|
|
GetResourceSet ( string resourceSet, string lang = null ) : |
Returns a resource set for a given resource
|
|
T ( string resId, string resourceSet = null, string lang = null ) : string |
Localization helper function that Translates a resource Id to a resource value string. Easy access that allows full control over the resource to retrieve or default UiCulture locale retrieval.
|
|
TDefault ( string resId, string defaultText, string resourceSet, string lang = null ) : string |
Localization helper function that Translates a resource Id to a resource value string. If id is not found default text is returned. Easy access that allows full control over the resource to retrieve or default UiCulture locale retrieval.
|
|
TFormat ( string format, string resId, string resourceSet ) : string |
Creates a localized format string that is transformed using the specified resource id.
|
|
TFormat ( string format, string resId, string resourceSet, string lang ) : string |
Creates a localized format string that is transformed using the specified resource id.
|
|
THtml ( string resId, string resourceSet = null, string lang = null ) : System.Web.HtmlString |
Localization helper function that Translates a resource Id to a resource value to an HtmlStringg. Easy access that allows full control over the resource to retrieve or default UiCulture locale retrieval. Use this version for HTML content that needs to be embedded in Razor views or other server tools that can use pre-encoded HTML content.
|
|
TObject ( string resId, string resourceSet = null, string lang = null, bool autoAdd = false ) : object |
Localization helper function that Translates a resource Id to a resource value object. Use this function if you're retrieving non-string values - for string values just use T.
|
|
WriteResource ( string resourceId, string value = null, string lang = null, string resourceSet = null ) : bool |
Writes a resource either creating or updating an existing resource
|
Метод | Описание | |
---|---|---|
DbRes ( ) : System.Collections.Generic |
public static DeleteResource ( string resourceId, string resourceSet = null, string lang = null ) : bool | ||
resourceId | string | The resource to delete |
resourceSet | string | The resource set to apply |
lang | string | The language Id - Be careful: If empty or null deletes matching keys for all languages |
Результат | bool |
public static GetResourceManager ( string resourceSet ) : |
||
resourceSet | string | |
Результат |
public static GetResourceSet ( string resourceSet, string lang = null ) : |
||
resourceSet | string | The name of the resource set to return. |
lang | string | The language code (en-US,de-DE). Pass null to use the current ui culture |
Результат |
public static T ( string resId, string resourceSet = null, string lang = null ) : string | ||
resId | string | The Resource Id to retrieve /// Note resource Ids can be *any* string and if no /// matching resource is found the id is returned. /// |
resourceSet | string | Name of the ResourceSet that houses this resource. If null or empty resources are used. |
lang | string | 5 letter or 2 letter language ieetf code: en-US, de-DE or en, de etc. |
Результат | string |
public static TDefault ( string resId, string defaultText, string resourceSet, string lang = null ) : string | ||
resId | string | The Resource Id to retrieve |
defaultText | string | Default text that is returned when resource with given resId is not found |
resourceSet | string | Name of the ResourceSet that houses this resource. If null or empty resources are used. |
lang | string | 5 letter or 2 letter language ieetf code: en-US, de-DE or en, de etc. |
Результат | string |
public static TFormat ( string format, string resId, string resourceSet ) : string | ||
format | string | Format string that is to be localized |
resId | string | Resource id to localize from |
resourceSet | string | Resource set to localize from |
Результат | string |
public static TFormat ( string format, string resId, string resourceSet, string lang ) : string | ||
format | string | Format string that is to be localized |
resId | string | Resource id to localize from |
resourceSet | string | Resource set to localize from |
lang | string | Language code |
Результат | string |
public static THtml ( string resId, string resourceSet = null, string lang = null ) : System.Web.HtmlString | ||
resId | string | The Resource Id to retrieve /// Note resource Ids can be *any* string and if no /// matching resource is found the id is returned. /// |
resourceSet | string | Name of the ResourceSet that houses this resource. If null or empty resources are used. |
lang | string | 5 letter or 2 letter language ieetf code: en-US, de-DE or en, de etc. |
Результат | System.Web.HtmlString |
public static TObject ( string resId, string resourceSet = null, string lang = null, bool autoAdd = false ) : object | ||
resId | string | The Resource Id to retrieve /// Note resource Ids can be *any* string and if no /// matching resource is found the id is returned. /// |
resourceSet | string | Name of the ResourceSet that houses this resource. If null or empty resources are used. |
lang | string | 5 letter or 2 letter language ieetf code: en-US, de-DE or en, de etc. |
autoAdd | bool | If true if a resource cannot be found a new entry is added in the invariant locale |
Результат | object |
public static WriteResource ( string resourceId, string value = null, string lang = null, string resourceSet = null ) : bool | ||
resourceId | string | Resource Id to write. Resource Ids can be any string up to 1024 bytes in length |
value | string | Value to set the resource to |
lang | string | Language as ieetf code: en-US, de-DE etc. /// Value can be left blank for Invariant/Default culture to set. /// |
resourceSet | string | The resourceSet to store the resource on. /// If no resource set name is provided a default empty resource set is used. |
Результат | bool |