C# Class i18n.Tests.TextLocalizer_Mock_PrefixSuffix

Mock implementation of ITextLocalizer with simplest of logic: · Supports single app language: "en" · GetText checks that the UserLanguage spec. matches "en" and if so simply wraps the msgid as follows: "xxxyyy". E.g. "Hello" -> "xxxHelloyyy". If no language match then returns null.
Inheritance: ITextLocalizer
ファイルを表示 Open project: turquoiseowl/i18n Class Usage Examples

Public Methods

Method Description
AddAppLanguage ( string langtag ) : void
GetAppLanguages ( ) : LanguageTag>.ConcurrentDictionary
GetText ( string msgid, string msgcomment, LanguageItem languages, LanguageTag &o_langtag, int maxPasses = -1 ) : string
TextLocalizer_Mock_PrefixSuffix ( string prefix = "", string suffix = "" ) : System

Method Details

AddAppLanguage() public method

public AddAppLanguage ( string langtag ) : void
langtag string
return void

GetAppLanguages() public method

public GetAppLanguages ( ) : LanguageTag>.ConcurrentDictionary
return LanguageTag>.ConcurrentDictionary

GetText() public method

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
return string

TextLocalizer_Mock_PrefixSuffix() public method

public TextLocalizer_Mock_PrefixSuffix ( string prefix = "", string suffix = "" ) : System
prefix string
suffix string
return System