Questions tagged [zend-translate]

Zend_Translate is the Zend Framework's solution for multilingual applications.

Zend_Translate is solution for multilingual applications. is preferred instead of PHP's native functions. Here you can read more about the benefits from using Zend_Translate and how to start using it.

160 questions
0
votes
1 answer

Zend_Translate : How can be done with zend framework translation that will translate each expression according his html id?

I beginner in zend framework and its a bit hard for me to understand zend_translate how its works. My Main Question: How can be done with zend framework translation that will translate each expression according his html id and how non programmer…
Ben
  • 25,389
  • 34
  • 109
  • 165
0
votes
6 answers

ZF2 navigation translate navigation labels and titles

I'm trying to find a way to translate the labels and titles. According to he ZF2 Manual all I have to do this: The navigation helpers support translation of page labels and titles. You can set a translator of type Zend\I18n\Translator in the helper…
FranMercaes
  • 151
  • 1
  • 1
  • 12
0
votes
1 answer

ZF2 plural translator, why an array?

In zf2 you have the view helper translatePlural . Which can be use as followed; echo $this->translatePlural('car', 'cars', $num); So when $num == 1 it says car else cars (depending on the plural rule but for now use the english rule). To translate…
MKroeders
  • 7,562
  • 4
  • 24
  • 39
0
votes
1 answer

Zf2 Translation Validator with Text Domain

i have an problem within the translator. I want to use for every module an module specific text domain (NAMESPACE). First i've seen that ZF2 need to inject the Translator into the Validators since Version 2.2 so i've do somethink like this in my…
0
votes
1 answer

The translations doesn't work when I send an email in zf2

I'm using the mailing library from zend framework 2, and also I'm using the translator functionality. But the translations only work inside the template .phtml, and not work in the service function for send the email, for example in translating the…
Cesar
  • 189
  • 8
0
votes
1 answer

How to use zend i18n module in mix php/other framework?

I want to use ZF2 i18n module in my custom php project. My composer.json file as bellow { "require": { "zendframework/zend-i18n": "2.3.*@dev" } } My index.php file is include_once './vendor/autoload.php'; use…
SKG
  • 510
  • 4
  • 20
0
votes
2 answers

Integrate Zend translator into my app

I wish to use the Translator classes of Zend framework in my app, but I don't want to include the whole framework. I grabbed the: Locale folder Translate folder Exception.php Loader.php Locale.php Registry.php Translate.php and copied into a…
Pherrymason
  • 7,835
  • 8
  • 39
  • 57
0
votes
1 answer

Zend Translation and View Scripts

Form labels and error messages are translated automatically. But strings in the view scripts are not. I have to use $this->translate("text to transfer"); in each and every phtml files.I don't want to use this $this->translate("text to transfer");…
Kiren S
  • 3,037
  • 7
  • 41
  • 69
0
votes
1 answer

Translation from DB ZF2

I have database with two fields - translation.name and translation.value. It is possible to create custom translator in ZF2, like standard $this->translate("SomeKey"); using translation from database? Please, tell me, how to implement it in my…
Walllter
  • 342
  • 8
  • 19
0
votes
1 answer

Initializing Zend 2 I18N translator to use existing gettext files

I have gettext translation files setup something like this: myapp/i18n/locale/da_DK/LC_MESSAGES/generic.mo myapp/i18n/locale/en_US/LC_MESSAGES/generic.mo I am trying to use Zend I18n translation component within my application e.g. use…
sakhunzai
  • 13,900
  • 23
  • 98
  • 159
0
votes
1 answer

change language with session in zend framework 2

I want make possible for user change the language of the webside. In the Module.php I wrote this: public function onBootstrap(MvcEvent $e) { $e->getApplication()->getServiceManager('translator'); $eventManager =…
Peach
  • 19
  • 7
0
votes
2 answers

make project multilingual with Zend/Translator

Good evening, I want to add zend/translate to my project to show my webside in several languages. But there doesn't work anything. Here are the steps I done already: In the module.config.php I looked if the translator is…
Peach
  • 19
  • 7
0
votes
1 answer

using a default language in TMX

I've created an application that should be partially translated into different languages. Currently I have a TMX file containing 2 languages (English and Dutch). It was set-up like this in the bootstrap file: protected function _initTranslation(){ …
gadeynebram
  • 725
  • 2
  • 6
  • 22
0
votes
1 answer

Translating first plural form in ZF1

With ZF1, if you have plural forms, do you have to pass an array to $this->translate(), even if you just want the first plural form (i.e. singular)? When I do this: $this->translate('Tournament'), it returns an array instead of a string. If so, then…
glen-84
  • 1,778
  • 2
  • 18
  • 30
0
votes
0 answers

Uncaught exception 'Zend_Locale_Exception' with message 'The locale '' is no known locale'

i'm trying to make the translation of a website in zend framework, but, given that is the first time i use this framework, i'm having some problems. The last one is the one that gives me the error you're seeing as a title here. I've set two…
softwareplay
  • 1,379
  • 4
  • 28
  • 64