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

Breadcrumb

  1. Drupal Core 11.1.x
  2. LocaleTranslation.php

function LocaleTranslation::canTranslateEnglish

Gets translate english configuration value.

Return value

bool TRUE if english should be translated, FALSE if not.

1 call to LocaleTranslation::canTranslateEnglish()
LocaleTranslation::getStringTranslation in core/modules/locale/src/LocaleTranslation.php
Retrieves English string to given language.

File

core/modules/locale/src/LocaleTranslation.php, line 136

Class

LocaleTranslation
String translator using the locale module.

Namespace

Drupal\locale

Code

protected function canTranslateEnglish() {
    if (!isset($this->translateEnglish)) {
        $this->translateEnglish = $this->configFactory
            ->get('locale.settings')
            ->get('translate_english');
    }
    return $this->translateEnglish;
}

API Navigation

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