C# 클래스 Bloom.Api.I18NHandler

This class handles requests for internationalization. It uses the L10NSharp LocalizationManager to look up values.
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop 1 사용 예제들

공개 메소드들

메소드 설명
GetTranslationDefaultMayNotBeEnglish ( string key, string defaultCurrent ) : string

We want the translation of the specified key in the current UI language. The normal LocalizationManager call expects to be passed an English default, which it will return if the language is English or if it has no translation for the string in the target language. The current default passed as an argument typically comes from the content of the element whose data-i18n attribute is the key in this method. However, this string may come from an earlier loclization and therefore NOT be English. If we pass it as the english default, we will get it back unchanged if the UI language has changed (back) to English. We will also get something other than English as a default for any langauge in which we don't have the localization.

HandleRequest ( string localPath, IRequestInfo info, CollectionSettings currentCollectionSettings ) : bool

비공개 메소드들

메소드 설명
IsInteger ( string key ) : bool
ReportL10NMissingString ( string id, string englishText ) : void

메소드 상세

GetTranslationDefaultMayNotBeEnglish() 공개 정적인 메소드

We want the translation of the specified key in the current UI language. The normal LocalizationManager call expects to be passed an English default, which it will return if the language is English or if it has no translation for the string in the target language. The current default passed as an argument typically comes from the content of the element whose data-i18n attribute is the key in this method. However, this string may come from an earlier loclization and therefore NOT be English. If we pass it as the english default, we will get it back unchanged if the UI language has changed (back) to English. We will also get something other than English as a default for any langauge in which we don't have the localization.
public static GetTranslationDefaultMayNotBeEnglish ( string key, string defaultCurrent ) : string
key string
defaultCurrent string
리턴 string

HandleRequest() 공개 정적인 메소드

public static HandleRequest ( string localPath, IRequestInfo info, CollectionSettings currentCollectionSettings ) : bool
localPath string
info IRequestInfo
currentCollectionSettings Bloom.Collection.CollectionSettings
리턴 bool