C# Class BlogEngine.Core.Json.JsonCulture

Represents the i18n culture used by blog.js. Used by ResourceHandler.
Datei anzeigen Open project: rasmuskl/ReSharperCourse Class Usage Examples

Public Methods

Method Description
AddResource ( string resourceLabelKey ) : string

Adds a new translatable string resource to this JsonCulture.

JsonCulture ( CultureInfo cultureInfo, ResourceType resourceType ) : System

Creates a new JsonCulture instance from the supplied CultureInfo.

This class uses a dictionary as its basis for storing/caching its information. This makes it incredibly easy to extend without having to create/remove properties.

ToJsonString ( ) : string

Returns a JSON formatted string repressentation of this JsonCulture instance's culture labels.

Method Details

AddResource() public method

Adds a new translatable string resource to this JsonCulture.
public AddResource ( string resourceLabelKey ) : string
resourceLabelKey string The key used to retrieve the translated value from global resource labels.
return string

JsonCulture() public method

Creates a new JsonCulture instance from the supplied CultureInfo.
This class uses a dictionary as its basis for storing/caching its information. This makes it incredibly easy to extend without having to create/remove properties.
public JsonCulture ( CultureInfo cultureInfo, ResourceType resourceType ) : System
cultureInfo System.Globalization.CultureInfo The CultureInfo needed to get the proper translations for this JsonCulture instance
resourceType ResourceType Type of resource (blog or admin)
return System

ToJsonString() public method

Returns a JSON formatted string repressentation of this JsonCulture instance's culture labels.
public ToJsonString ( ) : string
return string