C# Class i18n.Tests.TextLocalizer_Mock_SingleMessage

Mock implementation of ITextLocalizer with simplest of logic: · Supports single msgid/msgstr pair passed to cstor. · GetText checks that the UserLanguage spec. matches "en" and if so and msgid matches that passed to cstor, then returns the msgstr passed to cstor. Otherwise returns null.
Inheritance: ITextLocalizer
Afficher le fichier Open project: turquoiseowl/i18n Class Usage Examples

Méthodes publiques

Méthode Description
AddAppLanguage ( string langtag ) : void
GetAppLanguages ( ) : LanguageTag>.ConcurrentDictionary
GetText ( string msgid, string msgcomment, LanguageItem languages, LanguageTag &o_langtag, int maxPasses = -1 ) : string
TextLocalizer_Mock_SingleMessage ( string msgid, string msgstr ) : System

Method Details

AddAppLanguage() public méthode

public AddAppLanguage ( string langtag ) : void
langtag string
Résultat void

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_Mock_SingleMessage() public méthode

public TextLocalizer_Mock_SingleMessage ( string msgid, string msgstr ) : System
msgid string
msgstr string
Résultat System