public function HiddenLanguageBaseTestCase::getLanguage in Hidden Language 7
Get a language object from a language code.
2 calls to HiddenLanguageBaseTestCase::getLanguage()
- HiddenLanguageBaseTestCase::get in ./
hidden_language.test - Retrieves a Drupal path or an absolute path with language.
- HiddenLanguageBaseTestCase::post in ./
hidden_language.test - Posts to a Drupal path with language.
File
- ./
hidden_language.test, line 101 - Tests for Hidden Language module.
Class
- HiddenLanguageBaseTestCase
- Base class for Hidden Language module tests.
Code
public function getLanguage($langcode) {
if (is_object($langcode)) {
return $langcode;
}
else {
$language_list = language_list();
return $language_list[$langcode];
}
}