locale_translation_build_sources

locale_translation_build_sources(array $projects = array(), array $langcodes = array()) Build translation sources. Parameters array $projects: Array of project names. Defaults to all translatable projects. array $langcodes: Array of language codes. Defaults to all translatable languages. Return value array Array of source objects. Keyed by project name and language code. See also locale_translation_source_build() File core/modules/locale/locale.translation.inc, line 132 Common API for interf

locale_translation_build_server_pattern

locale_translation_build_server_pattern($project, $template) Build path to translation source, out of a server path replacement pattern. Parameters object $project: Project object containing data to be inserted in the template. string $template: String containing placeholders. Available placeholders: "%project": Project name. "%version": Project version. "%core": Project core version. "%language": Language code. Return value string String with replaced placeholders. File core/modules/lo

locale_translation_build_projects

locale_translation_build_projects() Builds list of projects and stores the result in the database. The project data is based on the project list supplied by the Update module. Only the properties required by Locale module is included and additional (custom) modules and translation server data is added. In case the Update module is disabled this function will return an empty array. Return value array Array of project data: "name": Project system name. "project_type": Project type, e.g. 'modul

locale_translation_batch_update_build

locale_translation_batch_update_build($projects = array(), $langcodes = array(), $options = array()) Builds a batch to check, download and import project translations. Parameters array $projects: Array of project names for which to update the translations. Defaults to all translatable projects. array $langcodes: Array of language codes. Defaults to all translatable languages. array $options: Array of import options. See locale_translate_batch_import_files(). Return value array Batch definitio

locale_translation_batch_status_finished

locale_translation_batch_status_finished($success, $results) Implements callback_batch_finished(). Set result message. Parameters bool $success: TRUE if batch successfully completed. array $results: Batch results. File core/modules/locale/locale.batch.inc, line 98 Batch process to check the availability of remote or local po files. Code function locale_translation_batch_status_finished($success, $results) { if ($success) { if (isset($results['failed_files'])) { if (\Drupal::modul

locale_translation_batch_status_check

locale_translation_batch_status_check($project, $langcode, array $options, &$context) Implements callback_batch_operation(). Checks the presence and creation time po translation files in located at remote server location and local file system. Parameters string $project: Machine name of the project for which to check the translation status. string $langcode: Language code of the language for which to check the translation. array $options: An array with options that can have the following e

locale_translation_batch_status_build

locale_translation_batch_status_build($projects = array(), $langcodes = array()) Builds a batch to get the status of remote and local translation files. The batch process fetches the state of both local and (if configured) remote translation files. The data of the most recent translation is stored per per project and per language. This data is stored in a state variable 'locale.translation_status'. The timestamp it was last updated is stored in the state variable 'locale.translation_last_checke

locale_translation_batch_fetch_import

locale_translation_batch_fetch_import($project, $langcode, $options, &$context) Implements callback_batch_operation(). Imports a gettext file from the translation directory. When successfully the translation status is updated. Parameters object $project: Source object of the translatable project. string $langcode: Language code. array $options: Array of import options. array $context: The batch context. See also locale_translate_batch_import_files() locale_translation_batch_fetch_download

locale_translation_batch_fetch_finished

locale_translation_batch_fetch_finished($success, $results) Implements callback_batch_finished(). Set result message. Parameters bool $success: TRUE if batch successfully completed. array $results: Batch results. File core/modules/locale/locale.batch.inc, line 216 Batch process to check the availability of remote or local po files. Code function locale_translation_batch_fetch_finished($success, $results) { module_load_include('bulk.inc', 'locale'); if ($success) { \Drupal::state()-&g

locale_translation_batch_fetch_download

locale_translation_batch_fetch_download($project, $langcode, &$context) Implements callback_batch_operation(). Downloads a remote gettext file into the translations directory. When successfully the translation status is updated. Parameters object $project: Source object of the translatable project. string $langcode: Language code. array $context: The batch context. See also locale_translation_batch_fetch_import() File core/modules/locale/locale.batch.inc, line 141 Batch process to check t