Tos Web Developer provides insights, tutorials, and advice around topics including content strategy, design, Drupal Development, Drupal Custom Module Development, Drupal 8 Custom themes, PHP, Server, Twig, and more


How to get current language programmatically in Drupal 8


 // Get current language code  
 $language = \Drupal::languageManager()->getCurrentLanguage()->getId();  

No comments:

Post a Comment

| Designed And Blog Post by www.toswebdeveloper.com