function locale_is_translatable
Same name and namespace in other branches
- 10 core/modules/locale/locale.module \locale_is_translatable()
- 11.x core/modules/locale/locale.module \locale_is_translatable()
- 9 core/modules/locale/locale.module \locale_is_translatable()
- 8.9.x 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.
Deprecated
in drupal:11.5.0 and is removed from drupal:13.0.0. Use \Drupal::service(LocaleLanguages::class)->isTranslatable() instead.
See also
https://www.drupal.org/node/3616293
File
-
core/
modules/ locale/ locale.module, line 384
Code
function locale_is_translatable($langcode) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use \\Drupal::service(LocaleLanguages::class)->isTranslatable() instead. See https://www.drupal.org/node/3616293', E_USER_DEPRECATED);
return \Drupal::service(LocaleLanguages::class)->isTranslatable($langcode);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.