Quantcast

BA7-899 Zend_Translate Help - Slovak Language

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

BA7-899 Zend_Translate Help - Slovak Language

Richard Knop
I am reposting this because my original post was blocked.

I need to just translate form error messages in my application.

The application is not multilingual, it is al in Slovak (so I already write labels and stuff in Slovak language), just need to translate error messages.

I have made this method in my bootstrap file:

protected function _initTranslate()
{
    $this->translate = new Zend_Translate('gettext',
                                          '/path/to/translation/source-sk.mo',
                                          'sk');
    Zend_Form::setDefaultTranslator($this->translate);
}

But how to create the source-sk.mo file? Do I need to download it somewhere from the Web (I searched for source-sk.mo on Google and haven't found anything)?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: BA7-899 Zend_Translate Help - Slovak Language

Giorgio Sironi
On Fri, Oct 9, 2009 at 11:24 PM, Richard Knop <[hidden email]> wrote:
I need to just translate form error messages in my application.

The keys for translation can be found in the Zend_Validate component as constants defined at the top of the classes.
 
But how to create the source-sk.mo file? Do I need to download it somewhere
from the Web (I searched for source-sk.mo on Google and haven't found
anything)?
 
You can use special editors to create and edit .mo/.po files:
http://www.gnu.org/software/gettext/manual/gettext.html
Of course you can use a different adapter, like the array one, and write the translations in a php file.


--
Giorgio Sironi
Piccolo Principe & Web Engineer
http://giorgiosironi.blogspot.com
http://twitter.com/giorgiosironi
Loading...