QT and LOCALE_DIRECTORY

View: New views
2 Messages — Rating Filter:   Alert me  

QT and LOCALE_DIRECTORY

by Davide Mendolia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I try to use Qt linguist file with the option array('scan' => Zend_Translate::LOCALE_DIRECTORY)

My code :

$translate = new Zend_Translate(Zend_Translate::AN_QT, $this->appDir . '/application/languages',
                                                null,
                                                array('scan' => Zend_Translate::LOCALE_DIRECTORY));

My folder strucuture :

languages/
               fr_BE/
                       application.ts
                       validate.ts
               nl_BE/
                       application.ts
                       validate.ts

My problem is : only the data of the last file of the same locale is keep in the adapter.
Because, at the load of the file the array _translate is reset. What's the solution ?

106             case 'ts':
107                 $this->_translate[$this->_target] = array();
108                 break;

http://framework.zend.com/code/browse/Zend_Framework/trunk/library/Zend/Translate/Adapter/Qt.php?r=8064#l107

Thanks
--
Davide Mendolia

Re: QT and LOCALE_DIRECTORY

by thomasW :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

To report an issue to http://framework.zend.com/issues

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message -----
From: "Davide Mendolia" <idaf_1er@...>
To: <fw-i18n@...>
Sent: Wednesday, May 07, 2008 11:01 AM
Subject: [fw-i18n] QT and LOCALE_DIRECTORY


> Hi,
>
> I try to use Qt linguist file with the option array('scan' =>
> Zend_Translate::LOCALE_DIRECTORY)
>
> My code :
>
> $translate = new Zend_Translate(Zend_Translate::AN_QT, $this->appDir .
> '/application/languages',
>                                                null,
>                                                array('scan' =>
> Zend_Translate::LOCALE_DIRECTORY));
>
> My folder strucuture :
>
> languages/
>               fr_BE/
>                       application.ts
>                       validate.ts
>               nl_BE/
>                       application.ts
>                       validate.ts
>
> My problem is : only the data of the last file of the same locale is keep
> in
> the adapter.
> Because, at the load of the file the array _translate is reset. What's the
> solution ?
>
> 106<http://framework.zend.com/code/browse/Zend_Framework/trunk/library/Zend/Translate/Adapter/Qt.php?r=8064#l106>
>            case 'ts':
> 107<http://framework.zend.com/code/browse/Zend_Framework/trunk/library/Zend/Translate/Adapter/Qt.php?r=8064#l107>
>                $this->_translate[$this->_target] = array();
> 108<http://framework.zend.com/code/browse/Zend_Framework/trunk/library/Zend/Translate/Adapter/Qt.php?r=8064#l108>
>                break;
> http://framework.zend.com/code/browse/Zend_Framework/trunk/library/Zend/Translate/Adapter/Qt.php?r=8064#l107
>
> Thanks
> --
> Davide Mendolia
>

LightInTheBox - Buy quality products at wholesale price