locale_is_translatable

locale_is_translatable($langcode)

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.

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');
}
doc_Drupal
2016-10-29 09:24:16
Comments
Leave a Comment

Please login to continue.