Functions - main - drupal

Primary tabs

Title Deprecated File name Summary Direct uses Strings
locale_form_language_admin_add_form_alter_submit core/modules/locale/locale.module Form submission handler for language_admin_add_form(). 1
locale_form_language_admin_edit_form_alter_submit core/modules/locale/locale.module Form submission handler for language_admin_edit_form(). 1
locale_get_plural core/modules/locale/locale.module Returns plural form index for a specific number. 2 2
locale_install core/modules/locale/locale.install Implements hook_install().
locale_is_translatable core/modules/locale/locale.module Checks whether $langcode is a language supported as a locale target. 8
locale_js_translate core/modules/locale/locale.module Returns a list of translation files given a list of JavaScript files. 1
locale_removed_post_updates core/modules/locale/locale.post_update.php Implements hook_removed_post_updates().
locale_schema core/modules/locale/locale.install Implements hook_schema().
locale_string_is_safe core/modules/locale/locale.module Check that a string is safe to be added or imported as a translation. 4
locale_system_file_system_settings_submit core/modules/locale/locale.module Submit handler for the file system settings form. 1
locale_system_remove core/modules/locale/locale.module Delete translation history of modules and themes. 2
locale_system_set_config_langcodes core/modules/locale/locale.module Updates default configuration when new modules or themes are installed. 2
locale_system_update core/modules/locale/locale.module Imports translations when new modules or themes are installed. 2
locale_test_uninstall core/modules/locale/tests/modules/locale_test/locale_test.install Implements hook_uninstall().
locale_translatable_language_list core/modules/locale/locale.module Returns list of translatable languages. 14
locale_translate_batch_build core/modules/locale/locale.bulk.inc Build a locale batch from an array of files. 2
locale_translate_batch_finished core/modules/locale/locale.bulk.inc Implements callback_batch_finished(). 1 1
locale_translate_batch_import core/modules/locale/locale.bulk.inc Implements callback_batch_operation(). 1 1
locale_translate_batch_import_files core/modules/locale/locale.bulk.inc Prepare a batch to import all translations.
locale_translate_batch_import_save core/modules/locale/locale.bulk.inc Implements callback_batch_operation(). 1
locale_translate_batch_refresh core/modules/locale/locale.bulk.inc Implements callback_batch_operation(). 1
locale_translate_delete_translation_files core/modules/locale/locale.bulk.inc Deletes interface translation files and translation history records. 3
locale_translate_file_attach_properties core/modules/locale/locale.bulk.inc Generates file properties from filename and options. 2
locale_translate_file_create core/modules/locale/locale.bulk.inc Creates a file object and populates the timestamp property.
locale_translate_get_interface_translation_files core/modules/locale/locale.bulk.inc Get interface translation files present in the translations directory. 3
locale_translation_batch_fetch_build core/modules/locale/locale.fetch.inc Builds a batch to download and import project translations. 1
locale_translation_batch_fetch_download core/modules/locale/locale.batch.inc Implements callback_batch_operation(). 1 2
locale_translation_batch_fetch_finished core/modules/locale/locale.batch.inc Implements callback_batch_finished(). 3
locale_translation_batch_fetch_import core/modules/locale/locale.batch.inc Implements callback_batch_operation(). 1 2
locale_translation_batch_status_build core/modules/locale/locale.compare.inc Builds a batch to get the status of remote and local translation files. 1
locale_translation_batch_status_check core/modules/locale/locale.batch.inc Implements callback_batch_operation(). 3 1
locale_translation_batch_status_finished core/modules/locale/locale.batch.inc Implements callback_batch_finished(). 1
locale_translation_batch_update_build core/modules/locale/locale.fetch.inc Builds a batch to check, download and import project translations. 6
locale_translation_batch_version_check core/modules/locale/locale.batch.inc Implements callback_batch_operation(). 1 1
locale_translation_build_projects core/modules/locale/locale.compare.inc Builds list of projects and stores the result in the database. 6
locale_translation_build_server_pattern

in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleSource::class) ->buildServerPattern($project, $template) instead.

core/modules/locale/locale.translation.inc Build path to translation source, out of a server path replacement pattern.
locale_translation_build_sources

in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleSource::class) ->buildSources($projects, $langcodes) instead.

core/modules/locale/locale.translation.inc Build translation sources.
locale_translation_check_projects core/modules/locale/locale.compare.inc Check for the latest release of project translations. 1
locale_translation_check_projects_batch core/modules/locale/locale.compare.inc Gets and stores the status and timestamp of remote po files. 1
locale_translation_check_projects_local core/modules/locale/locale.compare.inc Check and store the status and timestamp of local po files. 2
locale_translation_clear_cache_projects

in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service('locale.project')->resetCache() instead.

core/modules/locale/locale.translation.inc Clears the projects cache.
locale_translation_clear_status core/modules/locale/locale.module Clear the translation status cache. 3
locale_translation_default_translation_server core/modules/locale/locale.compare.inc Retrieve data for default server. 1
locale_translation_download_source core/modules/locale/locale.batch.inc Downloads a translation file from a remote server. 2
locale_translation_file_history_delete core/modules/locale/locale.module Deletes the history of downloaded translations. 2
locale_translation_flush_projects core/modules/locale/locale.compare.inc Clear the project data table. 1
locale_translation_get_file_history core/modules/locale/locale.module Gets current translation status from the {locale_file} table. 5 4
locale_translation_get_projects

in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service('locale.project')->getProjects($project_names) instead.

core/modules/locale/locale.translation.inc Get array of projects which are available for interface translation. 1
locale_translation_get_status core/modules/locale/locale.module Gets the current translation status. 16
locale_translation_http_check core/modules/locale/locale.batch.inc Check if remote file exists and when it was last updated. 1

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.