C# 클래스 System.Globalization.Localization

Holds all the information necessary to Localize the site into a single language.
파일 보기 프로젝트 열기: adaptabi/i18N-Complete 1 사용 예제들

공개 메소드들

메소드 설명
GetMessage ( string msgID ) : string

Given a msgID, returns the associated msgStr. If msgID doesn't exist in this collection, returns msgID. If the associated msgStr is empty, returns msgID.

GetMessageObject ( string msgID ) : Message

Given a msgID, returns the associated msgStr. If msgID doesn't exist in this collection, returns msgID. If the associated msgStr is empty, returns msgID.

LoadFromFile ( string filepath ) : void

Add Localization messages from a .po file. Doesn't initialize the collection, so it can be called from a loop if needed.

LoadFromReader ( TextReader reader ) : void

Add Localization messages from the specified TextReader (which hopefully points at a .po file) Doesn't initialize the collection, so it can be called from a loop if needed.

Localization ( ) : System

Creates a new, empty, Localization

Localization ( string filePath ) : System

Creates a new Localization, populated from a .po file at the supplied filePath

Localization ( string filePath, bool loadComments ) : System

Creates a new Localization, populated from a .po file at the supplied filePath. If requested, will also load comments from that file.

ToFile ( string filepath ) : void

Writes the contents of this Localization to the specified .po file.

보호된 메소드들

메소드 설명
Unescape ( string text ) : string

비공개 메소드들

메소드 설명
GetNodeType ( string line ) : NodeType

메소드 상세

GetMessage() 공개 메소드

Given a msgID, returns the associated msgStr. If msgID doesn't exist in this collection, returns msgID. If the associated msgStr is empty, returns msgID.
public GetMessage ( string msgID ) : string
msgID string
리턴 string

GetMessageObject() 공개 메소드

Given a msgID, returns the associated msgStr. If msgID doesn't exist in this collection, returns msgID. If the associated msgStr is empty, returns msgID.
public GetMessageObject ( string msgID ) : Message
msgID string
리턴 Message

LoadFromFile() 공개 메소드

Add Localization messages from a .po file. Doesn't initialize the collection, so it can be called from a loop if needed.
public LoadFromFile ( string filepath ) : void
filepath string
리턴 void

LoadFromReader() 공개 메소드

Add Localization messages from the specified TextReader (which hopefully points at a .po file) Doesn't initialize the collection, so it can be called from a loop if needed.
public LoadFromReader ( TextReader reader ) : void
reader TextReader
리턴 void

Localization() 공개 메소드

Creates a new, empty, Localization
public Localization ( ) : System
리턴 System

Localization() 공개 메소드

Creates a new Localization, populated from a .po file at the supplied filePath
public Localization ( string filePath ) : System
filePath string
리턴 System

Localization() 공개 메소드

Creates a new Localization, populated from a .po file at the supplied filePath. If requested, will also load comments from that file.
public Localization ( string filePath, bool loadComments ) : System
filePath string
loadComments bool If true, will populate comments so that this .po file can be saved again exactly as it was loaded.
리턴 System

ToFile() 공개 메소드

Writes the contents of this Localization to the specified .po file.
public ToFile ( string filepath ) : void
filepath string
리턴 void

Unescape() 보호된 메소드

protected Unescape ( string text ) : string
text string
리턴 string