View Single Post
  #1 (permalink)  
Old 10-09-2007, 01:22 PM
thiagolima thiagolima is offline
Junior Member
 
Join Date: Oct 2007
Posts: 4
Unhappy Problem with TMX using latin characters

I'm having problem with encoding latin character using TMX files for translate.

I got Olá instead of Olá

Thats the code.

>> Bootstrap
$locale = new Zend_Locale('pt_BR');
$registro->set('locale', $locale);

$translate = new Zend_Translate('tmx', './languages/language.tmx', 'pt_BR');
$registro->set('translate', $translate);

>> Controler
$translate = Zend_Registry::get('translate');
$messages = $translate->getMessages();
$this->view->messages = $messages;

$locale = Zend_Registry::get('locale');
$localeString = $locale->toString();
$this->view->localeString = $localeString;

>> View
<?php echo $this->messages[$this->localeString]["navGlobal_GrettingsMsg"]; ?>


>> TMX
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tmx SYSTEM "tmx14.dtd"><tmx version="1.4">
<header creationtoolversion="1.0.0" datatype="winres" o-tmf="abc" segtype="sentence" srclang="pt_BR">
</header>
<body>
<tu tuid="navGlobal_GrettingsMsg">
<tuv xml:lang="pt_BR"><seg>Olá</seg></tuv>
</tu>
</body>
</tmx>
Reply With Quote