* @param string|array|MessageSpecifier $value
* @return Message
* @throws InvalidArgumentException
+ * @since 1.27
*/
public static function newFromSpecifier( $value ) {
if ( $value instanceof RawMessage ) {
public function getTitle() {
global $wgContLang, $wgForceUIMsgAsContentMsg;
- $code = $this->getLanguage()->getCode();
$title = $this->key;
if (
- $wgContLang->getCode() !== $code
+ !$this->language->equals( $wgContLang )
&& in_array( $this->key, (array)$wgForceUIMsgAsContentMsg )
) {
+ $code = $this->language->getCode();
$title .= '/' . $code;
}