By gábor hojtsy on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Introduced in version:
8.0
Issue links:
Description:
When creating new languages, you should always instantiate a Language object.
Earlier in Drupal 8:
$language = (object) array(
'langcode' => 'it'
);
language_save($language);
Should use this instead:
$language = new Language(array(
'langcode' => 'it'
);
language_save($language);
The proper defaults based on the language code (if known to Drupal) will be set.
Impacts:
Module developers