C# Class System.Globalization.Message

A piece of text that may have been translated into another language.
Mostra file Open project: adaptabi/i18N-Complete Class Usage Examples

Public Properties

Property Type Description
Empty Message

Public Methods

Method Description
GetText ( bool plural = false ) : string

Returns either the text or the msgid. You can specify whether to return the plural form.

Message ( ) : System

Create a new, empty Message

Message ( string msgID ) : System

Create a new Message, setting the msgID to the supplied value

Message ( string msgID, string msgStr ) : System

Create a new Message, setting the supplied values

Message ( string msgID, string msgStr, string firstContext ) : System

Create a new Message, setting the supplied values

ToPOBlock ( ) : string

Return this message, formatted as it would appear in a .po file

ToString ( ) : string

Return the translated version of this message. If no translation is available, return the message itself

Private Methods

Method Description
Encode ( string text ) : string

Encodes a string line of text suitable for msgstr

Method Details

GetText() public method

Returns either the text or the msgid. You can specify whether to return the plural form.
public GetText ( bool plural = false ) : string
plural bool
return string

Message() public method

Create a new, empty Message
public Message ( ) : System
return System

Message() public method

Create a new Message, setting the msgID to the supplied value
public Message ( string msgID ) : System
msgID string
return System

Message() public method

Create a new Message, setting the supplied values
public Message ( string msgID, string msgStr ) : System
msgID string
msgStr string
return System

Message() public method

Create a new Message, setting the supplied values
public Message ( string msgID, string msgStr, string firstContext ) : System
msgID string
msgStr string
firstContext string
return System

ToPOBlock() public method

Return this message, formatted as it would appear in a .po file
public ToPOBlock ( ) : string
return string

ToString() public method

Return the translated version of this message. If no translation is available, return the message itself
public ToString ( ) : string
return string

Property Details

Empty public_oe static_oe property

An empty message to be used fast
public static Message,System.Globalization Empty
return Message