C# Класс i18n.NuggetLocalizer

The i18n default implementaion of the INuggetLocalizer service.
Наследование: INuggetLocalizer
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
s_internalDelimiter string[]

Защищенные свойства (Protected)

Свойство Тип Описание
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[]