Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. locale.module

function locale_is_translatable

Checks whether $langcode is a language supported as a locale target.

Parameters

string $langcode: The language code.

Return value

bool Whether $langcode can be translated to in locale.

8 calls to locale_is_translatable()
ExportForm::buildForm in core/modules/locale/src/Form/ExportForm.php
Form constructor.
ImportForm::buildForm in core/modules/locale/src/Form/ImportForm.php
Form constructor for the translation import screen.
LocaleConfigManager::processTranslatableData in core/modules/locale/src/LocaleConfigManager.php
Process the translatable data array with a given language.
LocaleConfigManager::updateConfigTranslations in core/modules/locale/src/LocaleConfigManager.php
Updates all configuration translations for the names / languages provided.
LocaleConfigSubscriber::updateLocaleStorage in core/modules/locale/src/LocaleConfigSubscriber.php
Update locale storage based on configuration translations.

... See full list

File

core/modules/locale/locale.module, line 418

Code

function locale_is_translatable($langcode) {
    return $langcode != 'en' || \Drupal::config('locale.settings')->get('translate_english');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal