Drupal - How to create language object from language string (e.g. 'en')?
Use language_list()
function:
<?php
function get_langugage_object($language) {
$installed_languages = language_list();
return $installed_languages[$language];
}
?>
Use language_list()
function:
<?php
function get_langugage_object($language) {
$installed_languages = language_list();
return $installed_languages[$language];
}
?>