C# Class Catel.Services.LanguageService

Service to implement the retrieval of language services.
Inheritance: LanguageServiceBase, ILanguageService
ファイルを表示 Open project: Catel/Catel Class Usage Examples

Public Methods

Method Description
ClearLanguageResources ( ) : void

Clears the language resources.

GetString ( ILanguageSource languageSource, string resourceName, CultureInfo cultureInfo ) : string

Gets the string from the specified resource file with the current culture.

GetString ( string resourceName ) : string

Gets the string with the PreferredCulture. If the preferred language cannot be found, this method will use the FallbackCulture to retrieve the string.

GetString ( string resourceName, CultureInfo cultureInfo ) : string

Gets the string with the specified culture.

LanguageService ( ) : System

Initializes a new instance of the LanguageService class.

PreloadLanguageSources ( ) : void

Preloads the language sources to provide optimal performance.

RegisterLanguageSource ( ILanguageSource languageSource ) : void

Registers the language source.

Protected Methods

Method Description
PreloadLanguageSource ( ILanguageSource languageSource ) : void

Preloads the language sources to provide optimal performance.

Private Methods

Method Description
GetResourceContainer ( string source ) : string
GetResourceManager ( string source ) : Windows.ApplicationModel.Resources.ResourceLoader

Gets the resource manager.

GetStringInternal ( string resourceName, CultureInfo cultureInfo ) : string

Method Details

ClearLanguageResources() public method

Clears the language resources.
public ClearLanguageResources ( ) : void
return void

GetString() public method

Gets the string from the specified resource file with the current culture.
The is null. The is null. The is null.
public GetString ( ILanguageSource languageSource, string resourceName, CultureInfo cultureInfo ) : string
languageSource ILanguageSource The language source.
resourceName string Name of the resource.
cultureInfo System.Globalization.CultureInfo The culture information.
return string

GetString() public method

Gets the string with the PreferredCulture. If the preferred language cannot be found, this method will use the FallbackCulture to retrieve the string.
The is null.
public GetString ( string resourceName ) : string
resourceName string Name of the resource.
return string

GetString() public method

Gets the string with the specified culture.
The is null. The is null.
public GetString ( string resourceName, CultureInfo cultureInfo ) : string
resourceName string Name of the resource.
cultureInfo System.Globalization.CultureInfo The culture information.
return string

LanguageService() public method

Initializes a new instance of the LanguageService class.
public LanguageService ( ) : System
return System

PreloadLanguageSource() protected method

Preloads the language sources to provide optimal performance.
protected PreloadLanguageSource ( ILanguageSource languageSource ) : void
languageSource ILanguageSource The language source.
return void

PreloadLanguageSources() public method

Preloads the language sources to provide optimal performance.
public PreloadLanguageSources ( ) : void
return void

RegisterLanguageSource() public method

Registers the language source.
The is null or whitespace.
public RegisterLanguageSource ( ILanguageSource languageSource ) : void
languageSource ILanguageSource The language source.
return void