We're planning to integrate the language-data library into MediaWiki core.
What?
Quoting from the README file of the language-data library
This library contains language related data, and utility libraries written in PHP and Node.js to interact with that data.
Here's a link to the PHP library: https://language-data.readthedocs.io/en/latest/index.html#using-the-php-library
Volunteers contribute language information to this YAML file: https://github.com/wikimedia/language-data/blob/master/data/langdb.yaml. This script is then run to generate a JSON file: https://github.com/wikimedia/language-data/blob/master/data/language-data.json. Here's a sample PR: https://github.com/wikimedia/language-data/pull/453
This data is then loaded into the PHP library via the following code:
$this->data = json_decode( file_get_contents( __DIR__ . '/' . self::LANGUAGE_DATA_PATH ) );
Similarly in JavaScript:
const languageData = require( '../data/language-data.json' );
The library is maintained by the Language and Product Localization team at the Wikimedia Foundation.
A new version of the library is released every 6 months, but we will released more often once the library is integrated into MediaWiki.
The language-data library's PHP API currently uses mustangostang/spyc but we will eventually make this a dev dependency soon.
Related task: T190129: Consolidate language metadata into a 'language-data' library and use in MediaWiki
Why?
This will then be used to support the language selector that will also be bundled with MediaWiki core and will be extended in the future for more usage. See: T190129: Consolidate language metadata into a 'language-data' library and use in MediaWiki
How?
We are planning to load the library into MediaWiki via composer.json.
For the front-end, we may use the JS library via foreign-resources.yaml.
The inclusion method is not yet confirmed.
When?
Preferably this quarter if possible.