|
| __construct (string $lang, string $key, ?array $params=null) |
|
| __clone () |
|
| toJsonArray () |
|
|
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) |
|
|
const | USER_LANG = "x-user" |
|
const | PAGE_LANG = "x-page" |
|
string | $lang |
| Value for the "lang" parameter.
|
|
string | $key |
| Key of the message in localization files.
|
|
array | $params |
|
◆ 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
◆ $lang
string Wikimedia\Parsoid\NodeData\I18nInfo::$lang |
Value for the "lang" parameter.
Can be one of USER_LANG or PAGE_LANG, or a fixed language code (discouraged when USER_LANG or PAGE_LANG could be used instead).
The documentation for this class was generated from the following file:
- src/NodeData/I18nInfo.php