C# Class Serenity.Localization.FallbackLocalTextRegistry

Adds key fallback to any ILocalTextRegistry implementation
Inheritance: ILocalTextRegistry
Afficher le fichier Open project: volkanceylan/Serenity

Méthodes publiques

Méthode Description
Add ( string languageID, string key, string text ) : void

Adds a local text entry to the registry

BreakUpString ( string value ) : string

Break up string without spaces (e.g. LastDirectoryUpdate) into a normal string (e.g. 'Last Directory Update')

FallbackLocalTextRegistry ( ILocalTextRegistry localTextRegistry ) : Serenity.Abstractions
TryGet ( string languageID, string key ) : string

Returns localized representation which corresponds to the local text key or the fallback if none found in the registry.

TryGetKeyFallback ( string key ) : string

Get a fallback of the local text key

Method Details

Add() public méthode

Adds a local text entry to the registry
public Add ( string languageID, string key, string text ) : void
languageID string Language ID (e.g. en-US, tr-TR)
key string Local text key
text string Translated text
Résultat void

BreakUpString() public static méthode

Break up string without spaces (e.g. LastDirectoryUpdate) into a normal string (e.g. 'Last Directory Update')
public static BreakUpString ( string value ) : string
value string
Résultat string

FallbackLocalTextRegistry() public méthode

public FallbackLocalTextRegistry ( ILocalTextRegistry localTextRegistry ) : Serenity.Abstractions
localTextRegistry ILocalTextRegistry
Résultat Serenity.Abstractions

TryGet() public méthode

Returns localized representation which corresponds to the local text key or the fallback if none found in the registry.
public TryGet ( string languageID, string key ) : string
languageID string Language identifier
key string Local text key (e.g. Enums.Month.June)
Résultat string

TryGetKeyFallback() public static méthode

Get a fallback of the local text key
public static TryGetKeyFallback ( string key ) : string
key string Local text key
Résultat string