Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Language\Language Class Reference

Base class for Language objects. More...

+ Inheritance diagram for Wikimedia\Parsoid\Language\Language:

Public Member Functions

 getConverter ()
 
 setConverter (LanguageConverter $converter)
 
 fetchLanguageNames (string $inLanguage, string $include)
 Get an array of language names, indexed by code.
 

Static Public Member Functions

static isValidInternalCode (string $code)
 Returns true if a language code string is of a valid form, whether or not it exists.
 

Detailed Description

Base class for Language objects.

Member Function Documentation

◆ fetchLanguageNames()

Wikimedia\Parsoid\Language\Language::fetchLanguageNames ( string $inLanguage,
string $include )

Get an array of language names, indexed by code.

Parameters
string$inLanguageCode of language in which to return the names. Use null for autonyms (native names)
string$includeOne of:
  • all all available languages
  • mw only if the language is defined in MediaWiki or wgExtraLanguageNames (default)
  • mwfile only if the language is in mw and has a message file
Returns
array
Deprecated
Appears to be unused

◆ isValidInternalCode()

static Wikimedia\Parsoid\Language\Language::isValidInternalCode ( string $code)
static

Returns true if a language code string is of a valid form, whether or not it exists.

This includes codes which are used solely for customisation via the MediaWiki namespace.

Parameters
string$codea MediaWiki-internal code
Returns
bool

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