You are here

function locale_is_translatable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/locale.module \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 743
Enables the translation of the user interface to languages other than English.

Code

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