Administration functions for locale.module.

File

core/includes/locale.inc

Functions

Namesort descending Description
country_get_list Get list of all predefined and custom countries.
locale_language_from_browser Identify language from the Accept-language HTTP header we got.
locale_language_from_interface Identifies the language from the current interface language.
locale_language_from_session Identify language from a request/session parameter.
locale_language_from_url Identify language via URL prefix or domain.
locale_language_from_user Identify language from the user preferences.
locale_language_negotiation_url_domains Reads language domains.
locale_language_negotiation_url_domains_save Saves the language domain settings.
locale_language_negotiation_url_prefixes Reads language prefixes and uses the langcode if no prefix is set.
locale_language_negotiation_url_prefixes_save Saves language prefix settings.
locale_language_switcher_session Return the session language switcher block.
locale_language_switcher_url Return links for the URL language switcher block.
locale_language_url_fallback Determines the language to be assigned to URLs when none is detected.
locale_language_url_rewrite_session Rewrite URLs for the Session language provider.
locale_language_url_rewrite_url Rewrite URLs for the URL language provider.
locale_string_is_safe Check that a string is safe to be added or imported as a translation.
timezone_country_get_list Get list of all predefined and custom timezone countries.
_locale_invalidate_js Force the JavaScript translation file(s) to be refreshed.
_locale_parse_js_file Parses a JavaScript file, extracts strings wrapped in Backdrop.t() and Backdrop.formatPlural() and inserts them into the database.
_locale_rebuild_js (Re-)Creates the JavaScript translation file for a language.

Constants

Namesort descending Description
LANGUAGE_NEGOTIATION_BROWSER The language is set based on the browser language settings.
LANGUAGE_NEGOTIATION_INTERFACE The language is determined using the current interface language.
LANGUAGE_NEGOTIATION_SESSION The language is set based on the request/session parameters.
LANGUAGE_NEGOTIATION_URL The language is determined using a URL language indicator: path prefix or domain according to the configuration.
LANGUAGE_NEGOTIATION_URL_DOMAIN URL language negotiation: use the domain as URL language indicator.
LANGUAGE_NEGOTIATION_URL_FALLBACK If no URL language is available language is determined using an already detected one.
LANGUAGE_NEGOTIATION_URL_PREFIX URL language negotiation: use the path prefix as URL language indicator.
LANGUAGE_NEGOTIATION_USER The language is set based on the user language settings.
LOCALE_IMPORT_KEEP Translation import mode keeping existing translations and only inserting new strings.
LOCALE_IMPORT_OVERWRITE Translation import mode overwriting all existing translations if new translated version available.
LOCALE_JS_OBJECT Regular expression pattern used to match simple JS object literal.
LOCALE_JS_OBJECT_CONTEXT Regular expression to match an object containing a key 'context'.
LOCALE_JS_STRING Regular expression pattern used to localize JavaScript strings.