Looks like this is the sort of data export that really belongs with a specific module that needs it, rather than side-wide or on every page.
"wgMonthNamesShort": ["", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
However, checking Codesearch shows it isn't actually used anywhere in core, nor in any WMF-deployed extensions. And in other repos, there's also only very few uses:
- SemanticMediaWiki: 1 use of wgMonthNames in ext.smw.dataItem.time.js.
- SemanticResultFormats: 1 use of wgMonthNames in ext.srf.api.results.js
- PageForms: 1 use of wgMonthNamesShort in PF_jsGrid.js.
Migration
For a MediaWiki extension:
- To access month names in the current user's interface language, use mediawiki.language.months.abbrev. Documentation: mediawiki.language, and T219340#5060585 for example code
- The access month names in the wiki's main content language, you will have to either lazy-load them from the Messages API, or (for greater performance) export them server-side in a generated package file where you export the result of $context->msg('jan')->inContentLanguage()->text() etc.
For a gadget, or user script:
- To access month names in specific language only, it might be easiest to simply declare the array in the code itself. (example diff English, example diff German).
- To access month names in the current user's interface language, use mediawiki.language.months.abbrev. Documentation: mediawiki.language, and T219340#5060585 for example code.
- To access month names in the wiki's main content language, you will have to either lazy-load them from the Messages API.