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:
As started with the language schema/object in http://drupal.org/node/1399806 the path aliases were converted to use 'langcode' for their language code property in both the database schema and the API. API functions such as drupal_get_path_alias(), drupal_get_normal_path() and drupal_lookup_path() already took a language code but used the $path_language name for that argument. Now that API is cleaned up to refer to $langcode as well.
Drupal 7:
$path = array('source' => 'node', 'alias' => 'home', 'language' => 'en');
path_save($path);
Drupal 8:
$path = array('source' => 'node', 'alias' => 'home', 'langcode' => 'en');
path_save($path);
Impacts:
Module developers