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
18
votes
2 answers

PHP/Gettext Problems

I remember running some tests a some months ago with gettext and the following code worked perfectly: putenv('LANG=l33t'); putenv('LANGUAGE=l33t'); putenv('LC_MESSAGES=l33t'); if (defined('LC_MESSAGES')) // available if PHP was compiled with…
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
15
votes
3 answers

Use PHP Gettext without having to install locales

I've been looking at options for internationalizing an open source project: Gettext, which everyone seems to recommend, apparently needs locales to be "installed on your system" to be used. See this note on the PHP manual, which reflects exactly my…
user1318194
9
votes
2 answers

Zend_Translate - Zend_Navigation and Routing combination problem!

I'm having some difficulties with the combination of Zend_Navigation, Zend_Translate and the routing needed. My site navigation is done through Zend_Navigation based on and XML file. I've now added translation to the site based on Zend_Translate and…
9
votes
5 answers

Zend framework 2 : How to set locale globaly?

I have to change the locale dynamically depending which language the user wants. I can set the locale in the Application/Module.php like this : public function onBootstrap(MvcEvent $e) { $translator =…
sgleser87
  • 235
  • 1
  • 3
  • 11
9
votes
1 answer

Zend Framework URL based translation routes

I am trying to implement URL based translation in Zend Framework so that my site is SEO friendly. This means that I want URLs like the below in addition to the default…
ba0708
  • 10,180
  • 13
  • 67
  • 99
7
votes
3 answers

How do i use translate in the Controller using Zend?

Usually i user translation in View with this code : translate("hello"); ?> How do i get a translation in the Controller?
storm_buster
  • 7,362
  • 18
  • 53
  • 75
6
votes
4 answers

override gettext .mo files

For translations in our application, we're using Zend Translate with the gettext adapter. In each module is a folder translations, containing .mo files for all the languages; da.mo nl.mo en.mo Which are scanned and added through the…
Rijk
  • 11,032
  • 3
  • 30
  • 45
5
votes
1 answer

Want to use Zend_translate outside the Zend framework?

i m creating a website with multilingual features. and i have search and found the zend_translate is the best way to translating the text. but i have started my website with simple php(no framework) and completed many modules. but now i want to use…
Nilay Patel
  • 151
  • 2
  • 6
5
votes
5 answers

Zend Translate doesn't find language

I've got a Zend Translate Issue. I have configure the zend translate in the bootstrap like below public function _initTranslate() { $locale = new Zend_Locale(); Zend_Registry::set('Zend_Locale', $locale); $translate = new…
dextervip
  • 4,999
  • 16
  • 65
  • 93
5
votes
1 answer

Zend_Translate translation of email templates

Using zend framework, i, as many others, send emails. Now for the email i use a view template. f.x. welcome.phtml Welcome to my site Hi name; ?>
Welcome to my site.

Regards siteName;…
Daniel
  • 51
  • 2
5
votes
1 answer

Zend framework not able to route the translated child routes

I am new to Zend framework 3 and was trying to translate the routes and i have partially succeeded.I am able to translate the main route and redirect it to the required location but for child routes the translation works but the redirection doesn't.…
5
votes
3 answers

Mysql adapter for Zend_Translate

I'm currently in the planning phase of a rather large project that I'll develop in the Zend Framework. One of the problems I'm facing is that the customers will want to translate not only the content but also the interface. I'm currently using…
Peter
  • 1,211
  • 4
  • 17
  • 32
5
votes
2 answers

Registering custom Translator Loader in Zend Framework 2

I'm trying to register a custom database translator loader. For that i was inspired by: Feeding Zend Translator I have the following facotry code in (module.config.php): 'service_manager' => array( 'factories' => array( 'translator' =>…
MadeOfSport
  • 513
  • 1
  • 7
  • 19
4
votes
1 answer

Can you inject variables into the text when using Zend_Translate in plural mode

I'm trying to use Zend_translate in a situation where I have to inject a variable value into the resulting string and have the string respect plural form. Using the regular (non-plural) view helper $this->translate() in a view script I can inject a…
Jens Wegar
  • 4,147
  • 4
  • 29
  • 34
4
votes
3 answers

Zend_Form Placeholder Translation

I have a Zend application with a Zend_Form, which should use the HTML5 placeholder attribute instead of labels, like done here. class Application_Form_Usereditprofile extends Zend_Form { public function init() { [...] …
danijar
  • 32,406
  • 45
  • 166
  • 297
1
2 3
10 11