public function appendCountryCode($path, $cc)
 {
     if (!Validator::isCountryCode($cc)) {
         throw new Exception(sprintf('the country-code: \'%s\' is unknown', $cc));
     }
     if ($this->force_ascii) {
         $this->set(sprintf($path, 'loc'), Translit::transliterate($cc));
     } else {
         $this->set(sprintf($path, 'loc'), $cc);
     }
     $this->set(sprintf($path, 'int'), Translit::transliterate($cc));
 }
Exemple #2
0
 public function testUmlaut()
 {
     $umlaut = 'Günter';
     $ascii = 'Gunter';
     $this->assertEquals($ascii, Translit::transliterate($umlaut));
 }