Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By tstoeckler on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
9.1.x
Issue links:
Description:
Various constants and functions relating to updating interface translations that are provided by the Interface Translation (locale
) module are deprecating in favor of a proper service and interface.
Deprecated constants
Constants in locale.module
have been replaced by equivalents on \Drupal\locale\TranslationUpdaterInterface
.
Old constant | New constant |
---|---|
LOCALE_TRANSLATION_USE_SOURCE_LOCAL |
TranslationUpdaterInterface::USE_LOCAL_SOURCE |
LOCALE_TRANSLATION_USE_SOURCE_REMOTE_AND_LOCAL |
TranslationUpdaterInterface::USE_REMOTE_AND_LOCAL_SOURCE |
LOCALE_TRANSLATION_DEFAULT_SERVER_PATTERN |
TranslationUpdaterInterface::DEFAULT_SERVER_PATTERN |
LOCALE_TRANSLATION_STATUS_TTL |
TranslationUpdaterInterface::STATUS_TTL |
LOCALE_TRANSLATION_OVERWRITE_ALL |
TranslationUpdaterInterface::OVERWRITE_ALL |
LOCALE_TRANSLATION_OVERWRITE_NON_CUSTOMIZED |
TranslationUpdaterInterface::OVERWRITE_NON_CUSTOMIZED |
LOCALE_TRANSLATION_OVERWRITE_NONE |
TranslationUpdaterInterface::OVERWRITE_NONE |
Deprecated functions
Various functions in locale.translation.inc
have been moved to a locale.translation_updater
service.
Old function | New method |
---|---|
_locale_translation_default_update_options() |
$translation_updater->getDefaultOptions() |
Impacts:
Module developers