C# Class Catel.Services.LanguageService

Service to implement the retrieval of language services.
Inheritance: LanguageServiceBase, ILanguageService
Afficher le fichier Open project: Catel/Catel Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
PreloadLanguageSource ( ILanguageSource languageSource ) : void

Preloads the language sources to provide optimal performance.

Private Methods

Méthode 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 méthode

Clears the language resources.
public ClearLanguageResources ( ) : void
Résultat void

GetString() public méthode

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.
Résultat string

GetString() public méthode

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.
Résultat string

GetString() public méthode

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.
Résultat string

LanguageService() public méthode

Initializes a new instance of the LanguageService class.
public LanguageService ( ) : System
Résultat System

PreloadLanguageSource() protected méthode

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

PreloadLanguageSources() public méthode

Preloads the language sources to provide optimal performance.
public PreloadLanguageSources ( ) : void
Résultat void

RegisterLanguageSource() public méthode

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