You are here

public function Drupali18nTestCase::switchLanguage in Internationalization 7

Same name and namespace in other branches
  1. 6 tests/drupal_i18n_test_case.php \Drupali18nTestCase::switchLanguage()

Switch global language

File

./i18n.test, line 283
Base class for Internationalization tests

Class

Drupali18nTestCase
@file Base class for Internationalization tests

Code

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