Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\NodeData\I18nInfo Class Reference
+ Inheritance diagram for Wikimedia\Parsoid\NodeData\I18nInfo:
+ Collaboration diagram for Wikimedia\Parsoid\NodeData\I18nInfo:

Public Member Functions

 __construct (string $lang, string $key, ?array $params=null)
 
 __clone ()
 
 toJsonArray ()
 

Static Public Member Functions

static createInterfaceI18n (string $key, ?array $params)
 Creates internationalization information for a string or attribute value in the user interface language.
 
static createPageContentI18n (string $key, ?array $params)
 Creates internationalization information for a string or attribute value in the page content language.
 
static createLangI18n (Bcp47Code $lang, string $key, ?array $params)
 Creates internationalization information for a string or attribute value in an arbitrary language.
 
static newFromJsonArray (array $json)
 

Public Attributes

const USER_LANG = "x-user"
 
const PAGE_LANG = "x-page"
 
 $lang
 
 $key
 
 $params
 

Member Function Documentation

◆ createInterfaceI18n()

static Wikimedia\Parsoid\NodeData\I18nInfo::createInterfaceI18n ( string $key,
?array $params )
static

Creates internationalization information for a string or attribute value in the user interface language.

Parameters
string$key
array | null$params
Returns
I18nInfo

◆ createLangI18n()

static Wikimedia\Parsoid\NodeData\I18nInfo::createLangI18n ( Bcp47Code $lang,
string $key,
?array $params )
static

Creates internationalization information for a string or attribute value in an arbitrary language.

The use of this method is discouraged; use ::createPageContentI18n(...) and ::createInterfaceI18n(...) where possible rather than, respectively, ::createLangI18n($wgContLang, ...) and ::createLangI18n($wgLang, ...).

Parameters
Bcp47Code$lang
string$key
array | null$params
Returns
I18nInfo

◆ createPageContentI18n()

static Wikimedia\Parsoid\NodeData\I18nInfo::createPageContentI18n ( string $key,
?array $params )
static

Creates internationalization information for a string or attribute value in the page content language.

Parameters
string$key
array | null$params
Returns
I18nInfo

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