Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Gábor Hojtsy on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
Language configuration does not store or ask for the native name of a language anymore, and the English name was changed to just name. If you need the name of a language in any language, you can use configuration translation (for configured languages) or t() for predefined languages using the language code.
// Assuming German interface translations are loaded, this will translate to native name.
$deutsch = t('German', array(), array('langcode' => 'de'));