C# Class i18n.TextLocalizer

A service for retrieving localized text from PO resource files
Inheritance: ITextLocalizer
Afficher le fichier Open project: turquoiseowl/i18n

Méthodes publiques

Méthode Description
GetAppLanguages ( ) : LanguageTag>.ConcurrentDictionary
GetText ( string msgid, string msgcomment, LanguageItem languages, LanguageTag &o_langtag, int maxPasses = -1 ) : string
TextLocalizer ( i18nSettings settings, ITranslationRepository translationRepository ) : System

Private Methods

Méthode Description
GetCacheKey ( string langtag ) : string
GetCultureInfoFromLanguage ( string language ) : CultureInfo
IsLanguageValid ( string langtag ) : bool

Assesses whether a language is PO-valid, that is whether or not one or more localized messages exists for the language.

LoadMessagesIntoCache ( string langtag ) : bool
LookupText ( string langtag, string msgkey ) : string
TryGetTextFor ( string langtag, string msgkey ) : string

Lookup whether any messages exist for the passed langtag, and if so attempts to lookup the message for the passed msgid, or if the msgid is null returns indication of whether any messages exist for the langtag.

Method Details

GetAppLanguages() public méthode

public GetAppLanguages ( ) : LanguageTag>.ConcurrentDictionary
Résultat LanguageTag>.ConcurrentDictionary

GetText() public méthode

public GetText ( string msgid, string msgcomment, LanguageItem languages, LanguageTag &o_langtag, int maxPasses = -1 ) : string
msgid string
msgcomment string
languages LanguageItem
o_langtag LanguageTag
maxPasses int
Résultat string

TextLocalizer() public méthode

public TextLocalizer ( i18nSettings settings, ITranslationRepository translationRepository ) : System
settings i18n.Domain.Concrete.i18nSettings
translationRepository ITranslationRepository
Résultat System