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.
Follow-up from #2108599: Convert language_default to CMI.
Problem/Motivation
class Language {
/**
* The values to use to instantiate the default language.
*
* @todo Remove once the default language is converted to config. See
* https://drupal.org/node/2108599.
*
* @var array
*/
public static $defaultValues = array(
'id' => 'en',
'name' => 'English',
'direction' => 0,
'weight' => 0,
'locked' => 0,
'default' => TRUE,
);
Proposed resolution
Remove the @todo in Language class as #2108599: Convert language_default to CMI is in.
Remaining tasks
User interface changes
API changes
Originally reported by michaellenahan at #2108599-35: Convert language_default to CMI
Comment | File | Size | Author |
---|---|---|---|
#3 | 2182093-DefaultLanguage-3.patch | 523 bytes | ThisIsDog |
Comments
Comment #1
michaellenahan CreditAttribution: michaellenahan commentedTo get started, here's an export of where Language::$defaultValues is being used as of now.
Comment #2
ThisIsDog CreditAttribution: ThisIsDog commentedComment #3
ThisIsDog CreditAttribution: ThisIsDog commentedI took a look at this and it seems to happen early enough you wouldn't use a Language Manager object. For example, two of the references are in the install file. Others would be creating a Language Manager object with another Language Manager object. I'm not sure what other work would need to be done other than removing the @todo.
I've gone ahead and submitted a patch to remove that line, but if something else needs to be done let me know and I'll update the patch.
Comment #4
Gábor HojtsyYeah this looks like this was made use in more places and is not to be removed anymore.
Comment #5
alexpottYep language config entities are provided by the language module so we need to hold this configuration somewhere else. This is a good a place as any because without the language module enabled none of this is configurable.
Comment #6
alexpottComment #7
jhodgdonThanks all! Committed to 8.x.
Comment #8
Gábor HojtsyYay, thanks!