C# 클래스 Cats.Localization.Services.LocalizationService

상속: ILocalizationService
파일 보기 프로젝트 열기: edgecomputing/cats

공개 메소드들

메소드 설명
AddLanguage ( Language language ) : bool
AddLanguage ( Language language, bool populateDefaultValues ) : bool
AddPage ( Page page ) : bool
DeleteLanguage ( Language language, bool cascadeDelete = true ) : bool
DeletePage ( Page page ) : bool
Dispose ( ) : void
GetLocalizedTextDictionaryForPage ( string pageName, string language ) : string>.Dictionary
GetLocalizedTextForPage ( Page page, string language = "EN" ) : List
GetLocalizedTextForPage ( string pageName, string language = "EN" ) : List
LocalizationService ( IUnitOfWork unitOfWork ) : System
TranslatePage ( string page, string>.Dictionary translations, string language = "EN" ) : bool

Adds new entries into the localized phrases table for all phrases in the 'translation' dictionary. It also associates the page 'page' with the list of translated phrases

UpdateLanguage ( Language language ) : bool
UpdatePage ( Page page ) : bool

비공개 메소드들

메소드 설명
LocalizedTextForPage ( int pageId, string language ) : IEnumerable
TranslatePage ( Page page, string>.Dictionary translations, string language = "EN" ) : void

Adds new entries into the localized phrases table for all phrases in the 'translation' dictionary. It also associates the page 'page' with the list of translated phrases

TranslatedTextFromDictionaryOrDefault ( string phrase, string>.Dictionary translations ) : string

Checks if a corresponding translated entry exist inside translations dictionary. If no match if found then it will return the language neutral phrase (the one passed as parameter).

메소드 상세

AddLanguage() 공개 메소드

public AddLanguage ( Language language ) : bool
language Language
리턴 bool

AddLanguage() 공개 메소드

public AddLanguage ( Language language, bool populateDefaultValues ) : bool
language Language
populateDefaultValues bool
리턴 bool

AddPage() 공개 메소드

public AddPage ( Page page ) : bool
page Cats.Localization.Models.Page
리턴 bool

DeleteLanguage() 공개 메소드

public DeleteLanguage ( Language language, bool cascadeDelete = true ) : bool
language Language
cascadeDelete bool
리턴 bool

DeletePage() 공개 메소드

public DeletePage ( Page page ) : bool
page Cats.Localization.Models.Page
리턴 bool

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetLocalizedTextDictionaryForPage() 공개 메소드

public GetLocalizedTextDictionaryForPage ( string pageName, string language ) : string>.Dictionary
pageName string
language string
리턴 string>.Dictionary

GetLocalizedTextForPage() 공개 메소드

public GetLocalizedTextForPage ( Page page, string language = "EN" ) : List
page Cats.Localization.Models.Page
language string
리턴 List

GetLocalizedTextForPage() 공개 메소드

public GetLocalizedTextForPage ( string pageName, string language = "EN" ) : List
pageName string
language string
리턴 List

LocalizationService() 공개 메소드

public LocalizationService ( IUnitOfWork unitOfWork ) : System
unitOfWork IUnitOfWork
리턴 System

TranslatePage() 공개 메소드

Adds new entries into the localized phrases table for all phrases in the 'translation' dictionary. It also associates the page 'page' with the list of translated phrases
public TranslatePage ( string page, string>.Dictionary translations, string language = "EN" ) : bool
page string Name of the page to translate
translations string>.Dictionary Dictionary of translation terms [Phrase][TranslatedPhrase]
language string Language to translate to
리턴 bool

UpdateLanguage() 공개 메소드

public UpdateLanguage ( Language language ) : bool
language Language
리턴 bool

UpdatePage() 공개 메소드

public UpdatePage ( Page page ) : bool
page Cats.Localization.Models.Page
리턴 bool