public function testDisableMultiLocale() { I18n::useMultiLocale(false); $currentLocale = I18n::getCurrentLocale(); $_REQUEST['_locale'] = 'en'; I18n::staticReset(); $this->assertEquals($currentLocale, I18n::getCurrentLocale(), 'Unable to disable multi locale'); $_REQUEST['_locale'] = 'zh_CN'; I18n::staticReset(); $this->assertEquals($currentLocale, I18n::getCurrentLocale(), 'Unable to disable multi locale'); unset($_REQUEST['_locale']); I18n::useMultiLocale(true); }
public static function getPageLanguage() { return strtr(static::getParam('page_language', I18n::getCurrentLocale()), ['_' => '-']); }