public function Drupali18nTestCase::getLanguage in Internationalization 7
Same name and namespace in other branches
- 6 tests/drupal_i18n_test_case.php \Drupali18nTestCase::getLanguage()
Get language object for langcode
4 calls to Drupali18nTestCase::getLanguage()
- Drupali18nTestCase::i18nAssertTranslations in ./i18n.test 
- Check strings for different languages
- Drupali18nTestCase::i18nCreateNode in ./i18n.test 
- Create node with language
- Drupali18nTestCase::i18nGet in ./i18n.test 
- Retrieves a Drupal path or an absolute path with language
- Drupali18nTestCase::switchLanguage in ./i18n.test 
- Switch global language
File
- ./i18n.test, line 271 
- Base class for Internationalization tests
Class
- Drupali18nTestCase
- @file Base class for Internationalization tests
Code
public function getLanguage($langcode) {
  if (is_object($langcode)) {
    return $langcode;
  }
  else {
    $language_list = language_list();
    return $language_list[$langcode];
  }
}