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
Introduced in version:
8.0
Issue links:
Description:
Drupal 8 now exposes three new special languages (Language not specified, Language not applicable and Multiple) as part of the regular language list. These languages are explained on the language list page.
The change for developers means the following:
Drupal 7
$all_languages = language_list(TRUE);
$enabled_languages = language_list();
Earlier Drupal 8 got disabled languages removed (See http://drupal.org/node/1548406). Now language_list() will get you either all configured non-locked languages, or all languages:
Drupal 8
$all_languages = language_list(LANGUAGE_ALL);
$only_non_locked_languages = language_list();
The $language->locked property identifies whether the language is locked or not.
Impacts:
Site builders, administrators, editors
Module developers