Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MessageGroup.php
Go to the documentation of this file.
1<?php
15
26interface MessageGroup {
31 public function getId();
32
40 public function getLabel( IContextSource $context = null );
41
49 public function getDescription( IContextSource $context = null );
50
57 public function getIcon();
58
63 public function getNamespace();
64
70 public function isMeta();
71
78 public function exists();
79
84 public function getValidator();
85
91 public function getMangler();
92
99 public function initCollection( $code );
100
109 public function load( $code );
110
115 public function getDefinitions();
116
122 public function getKeys();
123
130 public function getTags( $type = null );
131
139 public function getMessage( $key, $code );
140
145 public function getSourceLanguage();
146
151 public function getMessageGroupStates();
152
158 public function getTranslatableLanguages();
159
165 public function getSupportConfig(): ?array;
166}
This file contains the class for core message collections implementation.
Message validator is used to run validators to find common mistakes so that translators can fix them ...
Interface for message groups.
getMangler()
Return a message mangler or null.
getTranslatableLanguages()
Get all the translatable languages for a group, considering the inclusion and exclusion list.
initCollection( $code)
Initialises a message collection with the given language code, message definitions and message tags.
getIcon()
Returns an icon for this message group if any.
exists()
If this function returns false, the message group is ignored and treated like it would not be configu...
getTags( $type=null)
Returns message tags.
getNamespace()
Returns the namespace where messages are placed.
getSourceLanguage()
Returns language code depicting the language of source text.
getId()
Returns the unique identifier for this group.
getKeys()
Shortcut for array_keys( getDefinitions() ) that can be optimized by the implementing classes.
getDescription(IContextSource $context=null)
Returns a longer description about the group.
load( $code)
Returns a list of messages in a given language code.
getMessage( $key, $code)
Returns the definition or translation for given message key in given language code.
getValidator()
Returns a message validator object or null.
getSupportConfig()
Gets support URL defined for the group if any.
getDefinitions()
Shortcut for load( getSourceLanguage() ).
getLabel(IContextSource $context=null)
Returns the human readable label (as plain text).
getMessageGroupStates()
Get the message group workflow state configuration.