Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MessageGroup.php
Go to the documentation of this file.
1<?php
13
24interface MessageGroup {
29 public function getId();
30
38 public function getLabel( IContextSource $context = null );
39
47 public function getDescription( IContextSource $context = null );
48
55 public function getIcon();
56
61 public function getNamespace();
62
68 public function isMeta();
69
76 public function exists();
77
82 public function getValidator();
83
89 public function getMangler();
90
97 public function initCollection( $code );
98
107 public function load( $code );
108
113 public function getDefinitions();
114
120 public function getKeys();
121
128 public function getTags( $type = null );
129
137 public function getMessage( $key, $code );
138
143 public function getSourceLanguage();
144
149 public function getMessageGroupStates();
150
156 public function getTranslatableLanguages();
157
163 public function getSupportConfig(): ?array;
164}
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.