Change record status: 
Introduced in branch: 

Note LANGUAGE_MULTIPLE was later removed in #1869292: Remove confusing "multiple" language from core

Note LANGUAGE_* constants were moved to the Language class in #1620010: Move LANGUAGE constants to the Language class

Drupal 7 used LANGUAGE_NONE for cases, when the user did not know which language to apply or the user knew there was no linguistic information assignable or when multiple languages could have been assigned. To separate these cases, we renamed the LANGUAGE_NONE constant to LANGUAGE_NOT_SPECIFIED (retaining the 'und' - undefined value for it). We also added LANGUAGE_NOT_APPLICABLE for the case when language information is not applicable at all and LANGUAGE_MULTIPLE for cases when a set of languages might be applied but the individual pieces cannot be marked as such (like a PDF file uploaded on one in Drupal).

Drupal 7 before the change:


Drupal 8 after:

use Drupal\Core\Language\Language;


User interfaces to assign these and better defaults to apply these to new content are being worked on in #1471432: Rework language_list(), let people use more special languages and #1471444: Review use of LANGUAGE_NOT_SPECIFIED vs. LANGUAGE_NOT_APPLICABLE vs. LANGUAGE_MULTIPLE.

Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other updates done


Garrett Albright’s picture

Note that LANGUAGE_* constants were later renamed to LANGCODE_* . The example code above reflects that, but not the rest of the text.