public function testCodeSet() { $gettext = Sabel_I18n_Gettext::getInstance(); $gettext->setCodeSet("EUC-JP"); $this->assertEquals(mb_convert_encoding("なまえ", "EUC-JP", "UTF-8"), __("name")); $this->assertEquals(mb_convert_encoding("じゅうしょ", "EUC-JP", "UTF-8"), __("address")); }
public static function getInstance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; }