C# 클래스 Serenity.Localization.JsonLocalTextRegistration

Contains helper methods for registration of local texts in hierarchical/dictionary formatted JSON files.
파일 보기 프로젝트 열기: volkanceylan/Serenity

공개 메소드들

메소드 설명
AddFromFilesInFolder ( string path, ILocalTextRegistry registry = null ) : void
AddFromNestedDictionary ( JToken>.IDictionary nested, string prefix, string languageID, ILocalTextRegistry registry = null ) : void

Adds translation from a hierarchical local text dictionary parsed from JSON file.

AddJsonTexts ( this registry, string path ) : void

Adds translations from JSON files at specified path. File names in this directory should be in format {anyprefix}.{languageID}.json where {languageID} is a language code like 'en', 'en-GB' etc.

ProcessNestedDictionary ( JToken>.IDictionary nested, string prefix, string>.Dictionary target ) : void

Converts translation from a hierarchical local text dictionary to a simple dictionary.

메소드 상세

AddFromFilesInFolder() 공개 정적인 메소드

public static AddFromFilesInFolder ( string path, ILocalTextRegistry registry = null ) : void
path string
registry ILocalTextRegistry
리턴 void

AddFromNestedDictionary() 공개 정적인 메소드

Adds translation from a hierarchical local text dictionary parsed from JSON file.
public static AddFromNestedDictionary ( JToken>.IDictionary nested, string prefix, string languageID, ILocalTextRegistry registry = null ) : void
nested JToken>.IDictionary Object parsed from local text JSON string
prefix string Prefix to prepend before local text keys
languageID string Language ID
registry ILocalTextRegistry Registry
리턴 void

AddJsonTexts() 공개 정적인 메소드

Adds translations from JSON files at specified path. File names in this directory should be in format {anyprefix}.{languageID}.json where {languageID} is a language code like 'en', 'en-GB' etc.
public static AddJsonTexts ( this registry, string path ) : void
registry this Registry
path string Path containing JSON files
리턴 void

ProcessNestedDictionary() 공개 정적인 메소드

Converts translation from a hierarchical local text dictionary to a simple dictionary.
public static ProcessNestedDictionary ( JToken>.IDictionary nested, string prefix, string>.Dictionary target ) : void
nested JToken>.IDictionary Object parsed from local text JSON string
prefix string Prefix to prepend before local text keys
target string>.Dictionary Target dictionary that will contain keys and translations
리턴 void