40 foreach ( $fallbacks as $code ) {
41 $locales[] = LanguageCode::bcp47( $code );
47 foreach ( $formats as $format ) {
48 $pattern = $format[
'pattern'] ??
'';
49 foreach ( [
'mwMonth',
'mwMonthGen',
'mwMonthAbbrev' ] as $field ) {
50 if ( str_contains( $pattern,
"{$field}" ) ) {
51 $haveField[$field] =
true;
59 for ( $i = 1; $i <= 12; $i++ ) {
61 isset( $haveField[
'mwMonth'] ) ? $lang->
getMonthName( $i ) :
'',
66 while ( end( $data ) ===
'' ) {
67 unset( $data[ array_key_last( $data ) ] );
76 'locales' => $locales,
77 'formats' => $formats,
A class containing constants representing the names of configuration variables.
const Localtimezone
Name constant for the Localtimezone setting, for use with Config::get()
const LocalTZoffset
Name constant for the LocalTZoffset setting, for use with Config::get()
Context object that contains information about the state of a specific ResourceLoader web request.