The language code used when no language is explicitly assigned.

Defined by ISO639-2 for "Undetermined".

234 uses of LANGUAGE_NONE
AccessDeniedTestCase::testAccessDenied in modules/system/system.test
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::checkBookNode in modules/book/book.test
Checks the outline of sub-pages; previous, up, and next.
BookTestCase::createBookNode in modules/book/book.test
Creates a book node.

... See full list

File

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

Code

define('LANGUAGE_NONE', 'und')

Comments

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

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.