C# 클래스 Serenity.LocalText

파일 보기 프로젝트 열기: volkanceylan/Serenity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Empty LocalText

공개 메소드들

메소드 설명
Add ( object>.JsDictionary obj, string prefix ) : void

Use to add local text to dictionary

Obj is provided in a compact format to keep size as small as possible.

Get ( ) : string

Converts the text key, local text object contains to its textual representation.

Get ( string key ) : string

Returns localized representation which corresponds to the local text key or the key itself if none found in local text registry.

GetDefault ( string key, string defaultText ) : string

Tries to get localized text or if not found, default

InitializeTextClass ( Type type, string prefix ) : void

Initializes a static class that contains static LocalText objects. These objects actually contains localized texts in default language, but this method adds them to local text dictionary and replaces their values with text keys generated from concatting a prefix and the variable name.

LocalText ( string key ) : Serenity.Abstractions

Creates a new LocalText instance that contains the specified local text key

LocalText ( string key ) : System

Creates a new local text object containing the given key.

ToString ( ) : string

Returns localized representation which corresponds to the local text key or the key itself if none found in local text registry.

TryGet ( string key ) : string

Returns localized representation which corresponds to the local text key or NULL if none found in local text registry.

비공개 메소드들

메소드 설명
LocalText ( ) : Serenity.Abstractions

메소드 상세

Add() 공개 정적인 메소드

Use to add local text to dictionary
Obj is provided in a compact format to keep size as small as possible.
public static Add ( object>.JsDictionary obj, string prefix ) : void
obj object>.JsDictionary Object with local text list in a format like Enums:{WeekDays:{Monday: 'Pazartesi', ... }}} to /// "Enums.WeekDays.Monday" = "Pazartesi"
prefix string Prefix to add to all keys
리턴 void

Get() 공개 메소드

Converts the text key, local text object contains to its textual representation.
public Get ( ) : string
리턴 string

Get() 공개 정적인 메소드

Returns localized representation which corresponds to the local text key or the key itself if none found in local text registry.
public static Get ( string key ) : string
key string
리턴 string

GetDefault() 공개 정적인 메소드

Tries to get localized text or if not found, default
public static GetDefault ( string key, string defaultText ) : string
key string Text key
defaultText string Default text
리턴 string

InitializeTextClass() 공개 정적인 메소드

Initializes a static class that contains static LocalText objects. These objects actually contains localized texts in default language, but this method adds them to local text dictionary and replaces their values with text keys generated from concatting a prefix and the variable name.
public static InitializeTextClass ( Type type, string prefix ) : void
type System.Type Type to initialize that contains texts
prefix string Prefix to add text keys (e.g. "Db.SomeCategory.")
리턴 void

LocalText() 공개 메소드

Creates a new LocalText instance that contains the specified local text key
public LocalText ( string key ) : Serenity.Abstractions
key string Local text key
리턴 Serenity.Abstractions

LocalText() 공개 메소드

Creates a new local text object containing the given key.
public LocalText ( string key ) : System
key string
리턴 System

ToString() 공개 메소드

Returns localized representation which corresponds to the local text key or the key itself if none found in local text registry.
public ToString ( ) : string
리턴 string

TryGet() 공개 정적인 메소드

Returns localized representation which corresponds to the local text key or NULL if none found in local text registry.
public static TryGet ( string key ) : string
key string
리턴 string

프로퍼티 상세

Empty 공개적으로 정적으로 프로퍼티

An empty local text instance like String.Empty
public static LocalText,Serenity Empty
리턴 LocalText