C# 클래스 i18n.NuggetLocalizer

The i18n default implementaion of the INuggetLocalizer service.
상속: INuggetLocalizer
파일 보기 프로젝트 열기: turquoiseowl/i18n

공개 프로퍼티들

프로퍼티 타입 설명
s_internalDelimiter string[]

보호된 프로퍼티들

프로퍼티 타입 설명
m_regexPrintfIdentifiers System.Text.RegularExpressions.Regex

공개 메소드들

메소드 설명
ConvertIdentifiersInMsgId ( string msgid ) : string

Helper for converting the C printf-style %0, %1 ... style identifiers in a formatted nugget msgid string to the .NET-style format items: {0}, {1} ...

A formatted msgid may be in the form:

Enter between %1 and %0 characters

For which we return:

Enter between {1} and {0} characters

IsNuggetFormatted ( string nugget ) : bool

Returns indication of whether the passed nugget is formatted or not.

NuggetLocalizer ( i18nSettings settings, ITextLocalizer textLocalizer ) : System
ProcessNuggets ( string entity, LanguageItem languages ) : string

메소드 상세

ConvertIdentifiersInMsgId() 공개 정적인 메소드

Helper for converting the C printf-style %0, %1 ... style identifiers in a formatted nugget msgid string to the .NET-style format items: {0}, {1} ...
A formatted msgid may be in the form:

Enter between %1 and %0 characters

For which we return:

Enter between {1} and {0} characters

public static ConvertIdentifiersInMsgId ( string msgid ) : string
msgid string
리턴 string

IsNuggetFormatted() 공개 정적인 메소드

Returns indication of whether the passed nugget is formatted or not.
public static IsNuggetFormatted ( string nugget ) : bool
nugget string Subject nugget string.
리턴 bool

NuggetLocalizer() 공개 메소드

public NuggetLocalizer ( i18nSettings settings, ITextLocalizer textLocalizer ) : System
settings i18n.Domain.Concrete.i18nSettings
textLocalizer ITextLocalizer
리턴 System

ProcessNuggets() 공개 메소드

public ProcessNuggets ( string entity, LanguageItem languages ) : string
entity string
languages LanguageItem
리턴 string

프로퍼티 상세

m_regexPrintfIdentifiers 보호되어 있는 정적으로 프로퍼티

Regex for helping replace %0 style identifiers with {0} style ones.
protected static Regex,System.Text.RegularExpressions m_regexPrintfIdentifiers
리턴 System.Text.RegularExpressions.Regex

s_internalDelimiter 공개적으로 정적으로 프로퍼티

Sequence of chars used to delimit internal components of a Formatted nugget.
public static string[] s_internalDelimiter
리턴 string[]