You are here

public function Drupali18nTestCase::switchLanguage in Internationalization 6

Same name and namespace in other branches
  1. 7 i18n.test \Drupali18nTestCase::switchLanguage()

Switch global language

File

tests/drupal_i18n_test_case.php, line 195

Class

Drupali18nTestCase
Test case for typical Drupal tests.

Code

public function switchLanguage($newlang = NULL) {
  $newlang = $newlang ? $newlang : $this->install_locale;
  $GLOBALS['language'] = $this
    ->getLanguage($newlang);
}