Skip navigation
Help

Search for language

Classes

NameLocationDescription
LocaleCommentLanguageFunctionalTestdrupal/modules/locale/locale.testFunctional tests for comment language.
LocaleLanguageNegotiationInfoFunctionalTestdrupal/modules/locale/locale.testFunctional test for language types/negotiation info.
LocaleLanguageSwitchingFunctionalTestdrupal/modules/locale/locale.testFunctional tests for the language switching feature.
LocaleUILanguageNegotiationTestdrupal/modules/locale/locale.testTest UI language negotiation 1. URL (PATH) > DEFAULT UI Language base on URL prefix, browser language preference has no influence: admin/config UI in site default language zh-hans/admin/config UI in Chinese blah-blah/admin/config 404 2. URL (PATH)…
LocaleUserLanguageFunctionalTestdrupal/modules/locale/locale.testFunctional tests for a user's ability to change their default language.
PathLanguageTestCasedrupal/modules/path/path.test
PathLanguageUITestCasedrupal/modules/path/path.testTests the user interface for creating path aliases, with languages.
SearchLanguageTestCasedrupal/modules/search/search.testTest node search with multiple languages.

Constants

NameLocationDescription
DRUPAL_BOOTSTRAP_LANGUAGEdrupal/includes/bootstrap.incSeventh bootstrap phase: find out language of the page.
LANGUAGE_LTRdrupal/includes/bootstrap.incLanguage written left to right. Possible value of $language->direction.
LANGUAGE_NEGOTIATION_DEFAULTdrupal/includes/language.incNo language negotiation. The default language is used.
LANGUAGE_NONEdrupal/includes/bootstrap.incThe language code used when no language is explicitly assigned.
LANGUAGE_RTLdrupal/includes/bootstrap.incLanguage written right to left. Possible value of $language->direction.
LANGUAGE_TYPE_CONTENTdrupal/includes/bootstrap.incThe type of language used to define the content language.
LANGUAGE_TYPE_INTERFACEdrupal/includes/bootstrap.incThe type of language used to select the user interface.
LANGUAGE_TYPE_URLdrupal/includes/bootstrap.incThe type of language used for URLs.
LOCALE_LANGUAGE_NEGOTIATION_BROWSERdrupal/includes/locale.incThe language is set based on the browser language settings.
LOCALE_LANGUAGE_NEGOTIATION_INTERFACEdrupal/includes/locale.incThe language is determined using the current interface language.
LOCALE_LANGUAGE_NEGOTIATION_SESSIONdrupal/includes/locale.incThe language is set based on the request/session parameters.
LOCALE_LANGUAGE_NEGOTIATION_URLdrupal/includes/locale.incThe language is determined using a URL language indicator: path prefix or domain according to the configuration.
LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAINdrupal/includes/locale.incURL language negotiation: use the domain as URL language indicator.
LOCALE_LANGUAGE_NEGOTIATION_URL_FALLBACKdrupal/includes/locale.incIf no URL language is available language is determined using an already detected one.
LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIXdrupal/includes/locale.incURL language negotiation: use the path prefix as URL language indicator.
LOCALE_LANGUAGE_NEGOTIATION_USERdrupal/includes/locale.incThe language is set based on the user language settings.

Files

NameLocationDescription
drupal/includes/language.incdrupal/includes/language.incMultiple language handling functionality.

Functions & methods

NameLocationDescription
drupal_language_initializedrupal/includes/bootstrap.incInitialize all the defined language types.
drupal_language_typesdrupal/includes/bootstrap.incThe built-in language types.
EntityFieldQuery::fieldLanguageConditiondrupal/includes/entity.incAdds a condition on the field language column.
FieldTranslationsTestCase::testFieldAvailableLanguagesdrupal/modules/field/tests/field.testEnsures that only valid values are returned by field_available_languages().
FieldTranslationsTestCase::testFieldDisplayLanguagedrupal/modules/field/tests/field.testTests display language logic for translatable fields.
field_available_languagesdrupal/modules/field/field.multilingual.incCollects the available languages for the given entity type and field.
field_content_languagesdrupal/modules/field/field.multilingual.incReturns available content languages.
field_languagedrupal/modules/field/field.multilingual.incReturns the display language for the fields attached to the given entity.
field_test_field_available_languages_alterdrupal/modules/field/tests/field_test.moduleImplements hook_field_available_languages_alter().
field_test_field_language_alterdrupal/modules/field/tests/field_test.moduleImplements hook_field_language_alter().
field_valid_languagedrupal/modules/field/field.multilingual.incEnsures that a given language code is valid.
hook_field_available_languages_alterdrupal/modules/field/field.api.phpAlter field_available_languages() values.
hook_field_language_alterdrupal/modules/field/field.api.phpPerform alterations on field_language() values.
hook_language_fallback_candidates_alterdrupal/modules/locale/locale.api.phpPerform alterations on the language fallback candidates.
hook_language_initdrupal/modules/locale/locale.api.phpAllows modules to act after language initialization has been performed.
hook_language_negotiation_infodrupal/modules/locale/locale.api.phpAllow modules to define their own language providers.
hook_language_negotiation_info_alterdrupal/modules/locale/locale.api.phpPerform alterations on language providers.
hook_language_switch_links_alterdrupal/modules/locale/locale.api.phpPerform alterations on language switcher links.
hook_language_types_infodrupal/modules/locale/locale.api.phpAllow modules to define their own language types.
hook_language_types_info_alterdrupal/modules/locale/locale.api.phpPerform alterations on language types.
language_defaultdrupal/includes/bootstrap.incDefault language used on the site
language_fallback_get_candidatesdrupal/includes/language.incReturn the possible fallback languages ordered by language weight.
language_from_defaultdrupal/includes/language.incDefault language provider.
language_initializedrupal/includes/language.incChoose a language for the given type based on language negotiation settings.
language_listdrupal/includes/bootstrap.incGet a list of languages set up indexed by the specified key