Pass current language id to inline template

This commit is contained in:
Tilen Gombac 2022-10-28 14:44:55 +02:00
parent 62b51ddd8c
commit 8a4daa4e91

View File

@ -22,6 +22,11 @@ class ReturnCallController extends ControllerBase
'description' => [
'#type' => 'inline_template',
'#template' => $template,
'#context' => [
'language' => [
'id' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
],
],
],
];
@ -39,6 +44,11 @@ class ReturnCallController extends ControllerBase
'description' => [
'#type' => 'inline_template',
'#template' => $template,
'#context' => [
'language' => [
'id' => \Drupal::languageManager()->getCurrentLanguage()->getId(),
],
],
],
];