C# 클래스 Diva.Wifi.Localization

Tools for localization.
파일 보기 프로젝트 열기: diva/diva-distribution

공개 메소드들

메소드 설명
GetLanguageInfo ( string acceptLanguage ) : System.Globalization.CultureInfo[]

Parses the parameters of HTTP header Accept-Language.

LanguageInfoToString ( CultureInfo languageInfo ) : string

Creates a string representation from language information. The result can be parsed by GetLanguageInfo().

LocalizePath ( IEnvironment env, string path ) : string

Finds a localized file resource as a best match for the language information specified in the given environment context.

SetFrontendLanguage ( CultureInfo cinfo ) : void
Translate ( CultureInfo languages, string textId ) : string
Translate ( IEnvironment env, string textId ) : string

Translates a text according to the language information of the given environment context.

비공개 메소드들

메소드 설명
CheckPathExists ( string path, string language, string &localizedPath ) : bool

메소드 상세

GetLanguageInfo() 공개 정적인 메소드

Parses the parameters of HTTP header Accept-Language.
public static GetLanguageInfo ( string acceptLanguage ) : System.Globalization.CultureInfo[]
acceptLanguage string The value of HTTP header Accept-Language
리턴 System.Globalization.CultureInfo[]

LanguageInfoToString() 공개 정적인 메소드

Creates a string representation from language information. The result can be parsed by GetLanguageInfo().
public static LanguageInfoToString ( CultureInfo languageInfo ) : string
languageInfo System.Globalization.CultureInfo
리턴 string

LocalizePath() 공개 정적인 메소드

Finds a localized file resource as a best match for the language information specified in the given environment context.
public static LocalizePath ( IEnvironment env, string path ) : string
env IEnvironment The environment data with information about preferred languages
path string The file path of a resource
리턴 string

SetFrontendLanguage() 공개 정적인 메소드

public static SetFrontendLanguage ( CultureInfo cinfo ) : void
cinfo System.Globalization.CultureInfo
리턴 void

Translate() 공개 정적인 메소드

public static Translate ( CultureInfo languages, string textId ) : string
languages System.Globalization.CultureInfo
textId string
리턴 string

Translate() 공개 정적인 메소드

Translates a text according to the language information of the given environment context.
public static Translate ( IEnvironment env, string textId ) : string
env IEnvironment The environment data with information about preferred languages
textId string The text to be translated
리턴 string