3 namespace Wikimedia\Message
;
6 * Converts MessageValue message specifiers to localized plain text in a certain language.
8 * The caller cannot modify the details of message translation, such as which
9 * of multiple sources the message is taken from. Any such flags may be injected
10 * into the factory constructor.
12 * Implementations of TextFormatter are not required to perfectly format
13 * any message in any language. Implementations should make a best effort to
14 * produce human-readable text.
16 * @package MediaWiki\MessageFormatter
18 interface ITextFormatter
{
20 * Get the internal language code in which format() is
23 public function getLangCode();
26 * Convert a MessageValue to text.
28 * The result is not safe for use as raw HTML.
30 * @param MessageValue $message
32 * @return-taint tainted
34 public function format( MessageValue
$message );