Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-09-2007, 01:22 PM
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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-09-2007, 02:22 PM
Junior Member
 
Join Date: Oct 2007
Posts: 4
Smile utf8_decode

it works using <?php echo utf8_decode($this->messages[$this->localeString]["navGlobal_GrettingsMsg"]); ?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:33 PM.