public static function SimplifyingController::getLangcode in Simplifying 8
Simplifying get static pages langcode.
2 calls to SimplifyingController::getLangcode()
- SimplifyingController::services in src/
Controller/ SimplifyingController.php - Simplifying services page.
- SimplifyingController::training in src/
Controller/ SimplifyingController.php - Simplifying training page.
File
- src/
Controller/ SimplifyingController.php, line 39
Class
Namespace
Drupal\simplifying\ControllerCode
public static function getLangcode() {
$lengcode = \Drupal::languageManager()
->getCurrentLanguage()
->getId();
if (!in_array($lengcode, [
'uk',
'ru',
])) {
$lengcode = 'en';
}
return $lengcode;
}