C# Класс System.Globalization.Message

A piece of text that may have been translated into another language.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Empty Message

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Encode ( string text ) : string

Encodes a string line of text suitable for msgstr

Описание методов

GetText() публичный Метод

Returns either the text or the msgid. You can specify whether to return the plural form.
public GetText ( bool plural = false ) : string
plural bool
Результат string

Message() публичный Метод

Create a new, empty Message
public Message ( ) : System
Результат System

Message() публичный Метод

Create a new Message, setting the msgID to the supplied value
public Message ( string msgID ) : System
msgID string
Результат System

Message() публичный Метод

Create a new Message, setting the supplied values
public Message ( string msgID, string msgStr ) : System
msgID string
msgStr string
Результат System

Message() публичный Метод

Create a new Message, setting the supplied values
public Message ( string msgID, string msgStr, string firstContext ) : System
msgID string
msgStr string
firstContext string
Результат System

ToPOBlock() публичный Метод

Return this message, formatted as it would appear in a .po file
public ToPOBlock ( ) : string
Результат string

ToString() публичный Метод

Return the translated version of this message. If no translation is available, return the message itself
public ToString ( ) : string
Результат string

Описание свойств

Empty публичное статическое свойство

An empty message to be used fast
public static Message,System.Globalization Empty
Результат Message