MediaWiki REL1_31
Languages Class Reference
Inheritance diagram for Languages:
Collaboration diagram for Languages:

Public Member Functions

 __construct ()
 Load the list of languages: all the Messages*.php files in the languages directory.
 
 getCaseMismatchMagicWords ( $code)
 Get the magic words which do not match the case-sensitivity of the original words.
 
 getDuplicateMessages ( $code)
 Get the duplicate messages for a specific language.
 
 getEmptyMessages ( $code)
 Get the empty messages.
 
 getFallback ( $code)
 Get fallback language code for a specific language.
 
 getGeneralMessages ()
 Get all the general English messages, divided to groups: all - all the messages.
 
 getIgnoredMessages ()
 Get the ignored messages list.
 
 getLanguages ()
 Get the language list.
 
 getMagicWords ( $code)
 Get magic words for a specific language.
 
 getMessages ( $code)
 Get all the messages for a specific language (not English), without the fallback language messages, divided to groups: all - all the messages.
 
 getMessagesWithDubiousLinks ( $code)
 Get the messages which include dubious links.
 
 getMessagesWithMismatchVariables ( $code)
 Get the messages whose variables do not match the original ones.
 
 getMessagesWithoutPlural ( $code)
 Get the messages which do not use plural.
 
 getMessagesWithUnbalanced ( $code)
 Get the messages which include unbalanced brackets.
 
 getMessagesWithWhitespace ( $code)
 Get the messages with trailing whitespace.
 
 getMessagesWithWrongChars ( $code)
 Get the messages which include wrong characters.
 
 getNamespaceAliases ( $code)
 Get namespace aliases for a specific language.
 
 getNamespaceNames ( $code)
 Get namespace names for a specific language.
 
 getNonXHTMLMessages ( $code)
 Get the non-XHTML messages.
 
 getObsoleteMagicWords ( $code)
 Get the obsolete magic words.
 
 getObsoleteMessages ( $code)
 Get the obsolete messages for a specific language.
 
 getObsoleteSpecialPages ( $code)
 Get the obsolete special page names.
 
 getOptionalMessages ()
 Get the optional messages list.
 
 getOverridingMagicWords ( $code)
 Get the magic words that override the original English magic word.
 
 getProblematicProjectTalks ( $code)
 Get the project talk namespace names with no $1.
 
 getSpecialPageAliases ( $code)
 Get special page aliases for a specific language.
 
 getUntranslatedMagicWords ( $code)
 Get the untranslated magic words.
 
 getUntranslatedMessages ( $code)
 Get the untranslated messages for a specific language.
 
 getUntranslatedNamespaces ( $code)
 Get the untranslated namespace names.
 
 getUntraslatedSpecialPages ( $code)
 Get the untranslated special page names.
 

Protected Member Functions

 loadFile ( $code)
 Load the language file.
 

Protected Attributes

array $mFallback
 Fallback language in each language.
 
array $mGeneralMessages
 General messages in English, divided to groups.
 
array $mIgnoredMessages
 All the messages which should be exist only in the English file.
 
array $mLanguages
 List of languages.
 
array $mMagicWords
 Magic words.
 
array $mMessages
 Messages in each language (except for English), divided to groups.
 
array $mNamespaceAliases
 Namespace aliases.
 
array $mNamespaceNames
 Namespace names.
 
array $mOptionalMessages
 All the messages which may be translated or not, depending on the language.
 
array $mRawMessages
 Raw list of the messages in each language.
 
array $mSpecialPageAliases
 Special page aliases.
 

Private Member Functions

 loadGeneralMessages ()
 Load the messages for English and divide them to groups: all - all the messages.
 
 loadMessages ( $code)
 Load the messages for a specific language (which is not English) and divide them to groups: all - all the messages.
 

Detailed Description

Definition at line 27 of file languages.inc.

Constructor & Destructor Documentation

◆ __construct()

Languages::__construct ( )

Load the list of languages: all the Messages*.php files in the languages directory.

Definition at line 65 of file languages.inc.

Member Function Documentation

◆ getCaseMismatchMagicWords()

Languages::getCaseMismatchMagicWords ( $code)

Get the magic words which do not match the case-sensitivity of the original words.

Parameters
string$codeThe language code.
Returns
array The magic words whose case does not match in this language.

Definition at line 730 of file languages.inc.

References $code, $magicWords, and loadFile().

◆ getDuplicateMessages()

Languages::getDuplicateMessages ( $code)

Get the duplicate messages for a specific language.

Parameters
string$codeThe language code.
Returns
array The duplicate messages for this language.

Definition at line 348 of file languages.inc.

References $code, $value, loadGeneralMessages(), and loadMessages().

◆ getEmptyMessages()

Languages::getEmptyMessages ( $code)

Get the empty messages.

Parameters
string$codeThe language code.
Returns
array The empty messages for this language.

Definition at line 438 of file languages.inc.

References $code, $value, loadGeneralMessages(), and loadMessages().

◆ getFallback()

Languages::getFallback ( $code)

Get fallback language code for a specific language.

Parameters
string$codeThe language code.
Returns
string Fallback code.

Definition at line 269 of file languages.inc.

References $code, and loadFile().

◆ getGeneralMessages()

Languages::getGeneralMessages ( )

Get all the general English messages, divided to groups: all - all the messages.

required - messages which should be translated to other languages in order to get a complete translation. optional - messages which can be translated to other languages, but it's not required for a complete translation. ignored - messages which should not be translated to other languages. translatable - messages which are either required or optional, but can be translated from English.

Returns
array The general English messages.

Definition at line 256 of file languages.inc.

References $mGeneralMessages, and loadGeneralMessages().

◆ getIgnoredMessages()

Languages::getIgnoredMessages ( )

Get the ignored messages list.

Returns
array The ignored messages list.

Definition at line 87 of file languages.inc.

References $mIgnoredMessages.

◆ getLanguages()

Languages::getLanguages ( )

Get the language list.

Returns
array The language list.

Definition at line 78 of file languages.inc.

References $mLanguages.

◆ getMagicWords()

Languages::getMagicWords ( $code)

Get magic words for a specific language.

Parameters
string$codeThe language code.
Returns
array Magic words.

Definition at line 308 of file languages.inc.

References $code, and loadFile().

◆ getMessages()

Languages::getMessages ( $code)

Get all the messages for a specific language (not English), without the fallback language messages, divided to groups: all - all the messages.

required - messages which should be translated in order to get a complete translation. optional - messages which can be translated, the fallback translation is used if not translated. obsolete - messages which should not be translated, either because they do not exist, or they are ignored messages. translated - messages which are either required or optional, but translated from English and needed.

Parameters
string$codeThe language code.
Returns
string The messages in this language.

Definition at line 237 of file languages.inc.

References $code, and loadMessages().

◆ getMessagesWithDubiousLinks()

Languages::getMessagesWithDubiousLinks ( $code)

Get the messages which include dubious links.

Parameters
string$codeThe language code.
Returns
array The messages which include dubious links in this language.

Definition at line 545 of file languages.inc.

References $code, $matches, $messages, $value, loadGeneralMessages(), and loadMessages().

◆ getMessagesWithMismatchVariables()

Languages::getMessagesWithMismatchVariables ( $code)

Get the messages whose variables do not match the original ones.

Parameters
string$codeThe language code.
Returns
array The messages whose variables do not match the original ones.

Definition at line 382 of file languages.inc.

References $code, $value, loadGeneralMessages(), and loadMessages().

◆ getMessagesWithoutPlural()

Languages::getMessagesWithoutPlural ( $code)

Get the messages which do not use plural.

Parameters
string$codeThe language code.
Returns
array The messages which do not use plural in this language.

Definition at line 416 of file languages.inc.

References $code, $value, loadGeneralMessages(), and loadMessages().

◆ getMessagesWithUnbalanced()

Languages::getMessagesWithUnbalanced ( $code)

Get the messages which include unbalanced brackets.

Parameters
string$codeThe language code.
Returns
array The messages which include unbalanced brackets in this language.

Definition at line 575 of file languages.inc.

References $code, $messages, $value, loadGeneralMessages(), and loadMessages().

◆ getMessagesWithWhitespace()

Languages::getMessagesWithWhitespace ( $code)

Get the messages with trailing whitespace.

Parameters
string$codeThe language code.
Returns
array The messages with trailing whitespace in this language.

Definition at line 458 of file languages.inc.

References $code, $value, loadGeneralMessages(), and loadMessages().

◆ getMessagesWithWrongChars()

Languages::getMessagesWithWrongChars ( $code)

Get the messages which include wrong characters.

Parameters
string$codeThe language code.
Returns
array The messages which include wrong characters in this language.

Definition at line 507 of file languages.inc.

References $code, $value, loadGeneralMessages(), and loadMessages().

◆ getNamespaceAliases()

Languages::getNamespaceAliases ( $code)

Get namespace aliases for a specific language.

Parameters
string$codeThe language code.
Returns
array Namespace aliases.

Definition at line 295 of file languages.inc.

References $code, and loadFile().

◆ getNamespaceNames()

Languages::getNamespaceNames ( $code)

Get namespace names for a specific language.

Parameters
string$codeThe language code.
Returns
array Namespace names.

Definition at line 282 of file languages.inc.

References $code, and loadFile().

◆ getNonXHTMLMessages()

Languages::getNonXHTMLMessages ( $code)

Get the non-XHTML messages.

Parameters
string$codeThe language code.
Returns
array The non-XHTML messages for this language.

Definition at line 478 of file languages.inc.

References $code, $value, loadGeneralMessages(), and loadMessages().

◆ getObsoleteMagicWords()

Languages::getObsoleteMagicWords ( $code)

Get the obsolete magic words.

Parameters
string$codeThe language code.
Returns
array The obsolete magic words in this language.

Definition at line 680 of file languages.inc.

References $code, $magicWords, $value, and loadFile().

◆ getObsoleteMessages()

Languages::getObsoleteMessages ( $code)

Get the obsolete messages for a specific language.

Parameters
string$codeThe language code.
Returns
array The obsolete messages for this language.

Definition at line 368 of file languages.inc.

References $code, loadGeneralMessages(), and loadMessages().

◆ getObsoleteSpecialPages()

Languages::getObsoleteSpecialPages ( $code)

Get the obsolete special page names.

Parameters
string$codeThe language code.
Returns
array The obsolete special page names in this language.

Definition at line 774 of file languages.inc.

References $code, $specialPageAliases, $value, and loadFile().

◆ getOptionalMessages()

Languages::getOptionalMessages ( )

Get the optional messages list.

Returns
array The optional messages list.

Definition at line 96 of file languages.inc.

References $mOptionalMessages.

◆ getOverridingMagicWords()

Languages::getOverridingMagicWords ( $code)

Get the magic words that override the original English magic word.

Parameters
string$codeThe language code.
Returns
array The overriding magic words in this language.

Definition at line 700 of file languages.inc.

References $code, $magicWords, and loadFile().

◆ getProblematicProjectTalks()

Languages::getProblematicProjectTalks ( $code)

Get the project talk namespace names with no $1.

Parameters
string$codeThe language code.
Returns
array The problematic project talk namespaces in this language.

Definition at line 631 of file languages.inc.

References $code, $namespaces, $value, loadFile(), and NS_PROJECT_TALK.

◆ getSpecialPageAliases()

Languages::getSpecialPageAliases ( $code)

Get special page aliases for a specific language.

Parameters
string$codeThe language code.
Returns
array Special page aliases.

Definition at line 321 of file languages.inc.

References $code, and loadFile().

◆ getUntranslatedMagicWords()

Languages::getUntranslatedMagicWords ( $code)

Get the untranslated magic words.

Parameters
string$codeThe language code.
Returns
array The untranslated magic words in this language.

Definition at line 660 of file languages.inc.

References $code, $magicWords, $value, and loadFile().

◆ getUntranslatedMessages()

Languages::getUntranslatedMessages ( $code)

Get the untranslated messages for a specific language.

Parameters
string$codeThe language code.
Returns
array The untranslated messages for this language.

Definition at line 334 of file languages.inc.

References $code, loadGeneralMessages(), and loadMessages().

◆ getUntranslatedNamespaces()

Languages::getUntranslatedNamespaces ( $code)

Get the untranslated namespace names.

Parameters
string$codeThe language code.
Returns
array The untranslated namespace names in this language.

Definition at line 613 of file languages.inc.

References $code, loadFile(), and NS_MAIN.

◆ getUntraslatedSpecialPages()

Languages::getUntraslatedSpecialPages ( $code)

Get the untranslated special page names.

Parameters
string$codeThe language code.
Returns
array The untranslated special page names in this language.

Definition at line 754 of file languages.inc.

References $code, $specialPageAliases, $value, and loadFile().

◆ loadFile()

◆ loadGeneralMessages()

Languages::loadGeneralMessages ( )
private

Load the messages for English and divide them to groups: all - all the messages.

required - messages which should be translated to other languages in order to get a complete translation. optional - messages which can be translated to other languages, but it's not required for a complete translation. ignored - messages which should not be translated to other languages. translatable - messages which are either required or optional, but can be translated from English.

Definition at line 198 of file languages.inc.

References $value, and loadFile().

Referenced by getDuplicateMessages(), getEmptyMessages(), getGeneralMessages(), getMessagesWithDubiousLinks(), getMessagesWithMismatchVariables(), getMessagesWithoutPlural(), getMessagesWithUnbalanced(), getMessagesWithWhitespace(), getMessagesWithWrongChars(), getNonXHTMLMessages(), getObsoleteMessages(), getUntranslatedMessages(), and loadMessages().

◆ loadMessages()

Languages::loadMessages ( $code)
private

Load the messages for a specific language (which is not English) and divide them to groups: all - all the messages.

required - messages which should be translated in order to get a complete translation. optional - messages which can be translated, the fallback translation is used if not translated. obsolete - messages which should not be translated, either because they do not exist, or they are ignored messages. translated - messages which are either required or optional, but translated from English and needed.

Parameters
string$codeThe language code.

Definition at line 163 of file languages.inc.

References $code, $value, loadFile(), and loadGeneralMessages().

Referenced by getDuplicateMessages(), getEmptyMessages(), getMessages(), getMessagesWithDubiousLinks(), getMessagesWithMismatchVariables(), getMessagesWithoutPlural(), getMessagesWithUnbalanced(), getMessagesWithWhitespace(), getMessagesWithWrongChars(), getNonXHTMLMessages(), getObsoleteMessages(), and getUntranslatedMessages().

Member Data Documentation

◆ $mFallback

array Languages::$mFallback
protected

Fallback language in each language.

Definition at line 38 of file languages.inc.

◆ $mGeneralMessages

array Languages::$mGeneralMessages
protected

General messages in English, divided to groups.

Definition at line 41 of file languages.inc.

Referenced by getGeneralMessages().

◆ $mIgnoredMessages

array Languages::$mIgnoredMessages
protected

All the messages which should be exist only in the English file.

Definition at line 44 of file languages.inc.

Referenced by getIgnoredMessages().

◆ $mLanguages

array Languages::$mLanguages
protected

List of languages.

Definition at line 29 of file languages.inc.

Referenced by getLanguages().

◆ $mMagicWords

array Languages::$mMagicWords
protected

Magic words.

Definition at line 56 of file languages.inc.

◆ $mMessages

array Languages::$mMessages
protected

Messages in each language (except for English), divided to groups.

Definition at line 35 of file languages.inc.

◆ $mNamespaceAliases

array Languages::$mNamespaceAliases
protected

Namespace aliases.

Definition at line 53 of file languages.inc.

◆ $mNamespaceNames

array Languages::$mNamespaceNames
protected

Namespace names.

Definition at line 50 of file languages.inc.

◆ $mOptionalMessages

array Languages::$mOptionalMessages
protected

All the messages which may be translated or not, depending on the language.

Definition at line 47 of file languages.inc.

Referenced by getOptionalMessages().

◆ $mRawMessages

array Languages::$mRawMessages
protected

Raw list of the messages in each language.

Definition at line 32 of file languages.inc.

◆ $mSpecialPageAliases

array Languages::$mSpecialPageAliases
protected

Special page aliases.

Definition at line 59 of file languages.inc.


The documentation for this class was generated from the following file: