You are here

public function I18n::getCurrentLanguage in Bamboo Twig 8.5

Same name and namespace in other branches
  1. 8.2 bamboo_twig_i18n/src/TwigExtension/I18n.php \Drupal\bamboo_twig_i18n\TwigExtension\I18n::getCurrentLanguage()
  2. 8.3 bamboo_twig_i18n/src/TwigExtension/I18n.php \Drupal\bamboo_twig_i18n\TwigExtension\I18n::getCurrentLanguage()
  3. 8.4 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 45

Class

I18n
Provides some 'Internationalization' Twig Extensions.

Namespace

Drupal\bamboo_twig_i18n\TwigExtension

Code

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