lang = $lang; $this->key = $key; $this->params = $params; } /** * Creates internationalization information for a string or attribute value in the user * interface language. * @param string $key * @param array|null $params * @return I18nInfo */ public static function createInterfaceI18n( string $key, ?array $params ): I18nInfo { return new I18nInfo( self::USER_LANG, $key, $params ); } /** * Creates internationalization information for a string or attribute value in the page * content language. * @param string $key * @param array|null $params * @return I18nInfo */ public static function createPageContentI18n( string $key, ?array $params ): I18nInfo { return new I18nInfo( self::PAGE_LANG, $key, $params ); } /** * 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, ...). * @param Bcp47Code $lang * @param string $key * @param array|null $params * @return I18nInfo */ public static function createLangI18n( Bcp47Code $lang, string $key, ?array $params ): I18nInfo { return new I18nInfo( $lang->toBcp47Code(), $key, $params ); } }