locale.inc
locale.inc
Administration functions for locale.module.
File
includes/locale.incFunctions
Name | Description |
---|---|
country_get_list | Get list of all predefined and custom countries. |
locale_add_language | API function to add a language. |
locale_batch_by_component | Prepare a batch to run when installing modules or enabling themes. |
locale_batch_by_language | Prepare a batch to import translations for all enabled modules in a given language. |
locale_date_format_save | Save locale specific date formats to the database. |
locale_get_localized_date_format | Select locale date format details from database. |
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_switcher_session | Return the session language switcher block. |
locale_language_switcher_url | Return the URL language switcher block. Translation links may be provided by other modules. |
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. |
_locale_batch_build | Build a locale batch from an array of files. |
_locale_batch_import | Implements callback_batch_operation(). |
_locale_batch_language_finished | Implements callback_batch_finished(). |
_locale_batch_system_finished | Implements callback_batch_finished(). |
_locale_export_get_strings | Generates a structured array of all strings with translations in $language, if given. This array can be used to generate an export of the string in the database. |
_locale_export_po | Write a generated PO or POT file to the output. |
_locale_export_po_generate | Generates the PO(T) file contents for given strings. |
_locale_export_remove_plural | Removes plural index information from a string |
_locale_export_string | Print out a string on multiple lines |
_locale_export_wrap | Custom word wrapping for Portable Object (Template) files. |
_locale_import_append_plural | Modify a string to contain proper count indices |
_locale_import_message | Sets an error message occurred during locale file parsing. |
_locale_import_one_string | Imports a string into the database |
_locale_import_one_string_db | Import one string into the database. |
_locale_import_parse_arithmetic | Parses and sanitizes an arithmetic formula into a PHP expression |
_locale_import_parse_header | Parses a Gettext Portable Object file header |
_locale_import_parse_plural_forms | Parses a Plural-Forms entry from a Gettext Portable Object file header |
_locale_import_parse_quoted | Parses a string in quotes |
_locale_import_po | Parses Gettext Portable Object file information and inserts into database |
_locale_import_read_po | Parses Gettext Portable Object file into an array |
_locale_import_shorten_comments | Generate a short, one string version of the passed comment array |
_locale_import_tokenize_formula | Backward compatible implementation of token_get_all() for formula parsing |
_locale_invalidate_js | Force the JavaScript translation file(s) to be refreshed. |
_locale_parse_js_file | Parses a JavaScript file, extracts strings wrapped in Drupal.t() and Drupal.formatPlural() and inserts them into the database. |
_locale_prepare_predefined_list | Prepares the language code list for a select form item with only the unsupported ones |
_locale_rebuild_js | (Re-)Creates the JavaScript translation file for a language. |
_locale_translate_language_list | List languages in search result table |
_locale_translate_seek | Perform a string search and display results in a table |
_locale_translate_seek_query | Build array out of search criteria specified in request variables |
Constants
Name | Description |
---|---|
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. |
LOCALE_LANGUAGE_NEGOTIATION_BROWSER | The language is set based on the browser language settings. |
LOCALE_LANGUAGE_NEGOTIATION_INTERFACE | The language is determined using the current interface language. |
LOCALE_LANGUAGE_NEGOTIATION_SESSION | The language is set based on the request/session parameters. |
LOCALE_LANGUAGE_NEGOTIATION_URL | The language is determined using a URL language indicator: path prefix or domain according to the configuration. |
LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN | URL language negotiation: use the domain as URL language indicator. |
LOCALE_LANGUAGE_NEGOTIATION_URL_FALLBACK | If no URL language is available language is determined using an already detected one. |
LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX | URL language negotiation: use the path prefix as URL language indicator. |
LOCALE_LANGUAGE_NEGOTIATION_USER | The language is set based on the user language settings. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!locale.inc/7.x