LanguageMarker

final class \TYPO3\CMS\Core\Schema\LanguageMarker

Introduce language values that carry a special meaning.

Every language value is the ID of a site language, or a reserved value such as "all languages". This is deliberately a set of markers and not an enum: language values stay integers, and these constants only name the values that carry a special meaning.

Table of Contents

Constants

ALL_LANGUAGES  : mixed = -1
A record whose language field (usually "sys_language_uid") holds this value is valid in every language of a site. It is never translated, and it is never overlaid. Backend logic, selectors and filters use the same value to express "all languages", even where it is not read from a record.
DEFAULT_LANGUAGE  : mixed = 0
A record whose language field (usually "sys_language_uid") holds this value is in the default language: it is the original record that translations point to. Language values greater than this one denote translations. Backend logic, selectors and filters use the same value to express "default language", even where it is not read from a record.

Constants

ALL_LANGUAGES

A record whose language field (usually "sys_language_uid") holds this value is valid in every language of a site. It is never translated, and it is never overlaid. Backend logic, selectors and filters use the same value to express "all languages", even where it is not read from a record.

public mixed ALL_LANGUAGES = -1

Other uses of -1, for example in calculations, are unrelated to this marker.

DEFAULT_LANGUAGE

A record whose language field (usually "sys_language_uid") holds this value is in the default language: it is the original record that translations point to. Language values greater than this one denote translations. Backend logic, selectors and filters use the same value to express "default language", even where it is not read from a record.

public mixed DEFAULT_LANGUAGE = 0

This is not necessarily the language returned by SiteInterface::getDefaultLanguage(): a site that does not configure this language falls back to its first configured language.

On this page