The language code used when no language is explicitly assigned.

Defined by ISO639-2 for "Undetermined".

144 uses of LANGUAGE_NONE
AggregatorTestCase::createSampleNodes in modules/aggregator/aggregator.test
Creates sample article nodes.
BlogTestCase::verifyBlogs in modules/blog/blog.test
Verify the logged in user has the desired access to the various blog nodes.
BookTestCase::createBookNode in modules/book/book.test
Creates a book node.
book_admin_edit_submit in modules/book/
Form submission handler for book_admin_edit().
CommentAnonymous::testAnonymous in modules/comment/comment.test
Test anonymous comment functionality.

... See full list


includes/, line 181
Functions that need to be loaded on every Drupal request.


define('LANGUAGE_NONE', 'und');


Chi’s picture

In Drupal 8, this is now called LANGUAGE_NOT_SPECIFIED

rudiedirkx’s picture

You mean core/lib/Drupal/Core/Language/Language.php/constant/Language::LANGCODE_NOT_SPECIFIED/8

I don't know which parts are part of the full class name. Go PSR-0.

kingandy’s picture

pankajchaudhari’s picture

Elijah Lynn’s picture

suvzz’s picture

Why is this 'LANGUAGE_NONE' at all needed when this ultimately means 'und'. Why can't we directly write und ? Is it just the reason to use Drupal api little more ?

dalin’s picture

It's basically a form of in-code documentation. If someone who has little/no Drupal experience is looking at this code, they're going to ask "WTF is all this 'und' stuff.", but if it's a constant then they can click through in their IDE and find the definition of the constant and links to more info.

kingandy’s picture

Also there's the small-but-remote possibility that the code might change from 'und' to something else ... it's easier to change the define() statement than chase through every core and contrib module correcting explicit strings.