You are here

public function I18n::getCurrentLanguage in Bamboo Twig 8.4

Same name and namespace in other branches
  1. 8.5 bamboo_twig_i18n/src/TwigExtension/I18n.php \Drupal\bamboo_twig_i18n\TwigExtension\I18n::getCurrentLanguage()
  2. 8.2 bamboo_twig_i18n/src/TwigExtension/I18n.php \Drupal\bamboo_twig_i18n\TwigExtension\I18n::getCurrentLanguage()
  3. 8.3 bamboo_twig_i18n/src/TwigExtension/I18n.php \Drupal\bamboo_twig_i18n\TwigExtension\I18n::getCurrentLanguage()

Retrieve the current language.

1 call to I18n::getCurrentLanguage()
I18n::getTranslation in bamboo_twig_i18n/src/TwigExtension/I18n.php
Gets a translation of the entity.

File

bamboo_twig_i18n/src/TwigExtension/I18n.php, line 43

Class

I18n
Provides some 'Internationalization' Twig Extensions.

Namespace

Drupal\bamboo_twig_i18n\TwigExtension

Code

public function getCurrentLanguage() {
  return $this
    ->getLanguageManager()
    ->getCurrentLanguage()
    ->getId();
}