By gábor hojtsy on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
The locale_add_language() function that used to be used for adding languages is now replaced by locale_language_save() which is modernized to work with standard tools and hooks and be useful for updating languages.
Drupal 7.x:
locale_add_language($langcode, $name, $native, $direction, $domain, $prefix);
Drupal 8.x:
$language = (object) array(
'language' => $langcode,
'name' => $name,
'native' => $native,
'direction' => $direction,
'domain' => $domain,
'prefix' => $prefix,
);
locale_language_save($language);
Impacts:
Module developers
Comments
Drupal 8
locale_language_save() was not in Drupal 8 finally.
I think we can use:
I think, I'm not sure.