getLanguage() ); return [ 'digitTransformTable' => $language->digitTransformTable(), 'separatorTransformTable' => $language->separatorTransformTable(), 'minimumGroupingDigits' => $language->minimumGroupingDigits(), 'grammarForms' => $language->getGrammarForms(), 'grammarTransformations' => $language->getGrammarTransformations(), 'pluralRules' => $language->getPluralRules(), 'digitGroupingPattern' => $language->digitGroupingPattern(), 'fallbackLanguages' => $language->getFallbackLanguages(), 'bcp47Map' => LanguageCode::getNonstandardLanguageCodeMapping(), ]; } /** * @param ResourceLoaderContext $context * @return string JavaScript code */ public function getScript( ResourceLoaderContext $context ) { $fileScript = parent::getScript( $context ); $langDataScript = Xml::encodeJsCall( 'mw.language.setData', [ $context->getLanguage(), $this->getData( $context ) ], ResourceLoader::inDebugMode() ); return $fileScript . $langDataScript; } /** * @return bool */ public function enableModuleContentVersion() { return true; } /** * @return bool */ public function supportsURLLoading() { return false; } }