Tag Archive

Accessing Bootstrap Resources from Anywhere

Published on 14 May, 2010 By Danny Froberg

Alek­sey V. Zap­parov posts a very nice solu­tion to a very com­mon ques­tion when deal­ing with Boot­strap resources; Hello, You can either reg­is­ter pre­cious resources in reg­istry, e.g.: pro­tected func­tion _initMyResource() {     $res = ‘foo­bar’;     Zend_Registry::set(‘myResource’, $res);     return $res; } Or you can reg­is­ter the whole boot­strap, so you […]

& Currency Lists">Zend_Form Translated Country & Currency Lists

Published on 31 January, 2010 By Danny Froberg

A very com­mon ques­tion is how do I get a local­ized / trans­lated list of coun­tries, cur­ren­cies etc for a com­pany reg­is­tra­tion form or sim­i­lar. Here is a easy to use sam­ple; For your cut’n’paste plea­sure <?php class Form_Company extends Zend_Form {     pri­vate $ele­ment­Dec­o­ra­tors = array(               […]

Bootstrapping Zend_Translate with a LangSelector Plugin

Published on 17 January, 2010 By Danny Froberg
This entry is part 4 of 3 in the series Work­ing with Zend_Translate and Poedit

As an update to the method of hav­ing every­thing related to Zend_Translate and Zend_Locale in the Boot­strap, here is an alter­na­tive using an Con­troller Plu­gin that does the grunt work of val­i­dat­ing, select­ing and updat­ing the Zend_Locale, Zend_Registry & Zend_Session using Zend_Session_Namespace. And we are using poedit .po & .mo files as the source as usual.

Bootstrap Zend_Translate

Published on 2 January, 2010 By Danny Froberg
This entry is part 2 of 3 in the series Work­ing with Zend_Translate and Poedit

A recur­ring prob­lem for site devel­op­ers is imple­ment­ing a solid way to cre­ate and main­tain mul­ti­lin­gual sites, this arti­cle series is my fee­ble attempt to guide you through how to quickly imple­ment the Zend_Translate in an Zend Frame­work 1.9.x site.
The pro­ce­dures and best prac­tices for this is unfor­tu­nately like train­ing a dog, every­one has a dif­fer­ent way of doing it and an opin­ion, so the meth­ods and code I show here are take out of appli­ca­tions that are run­ning in pro­duc­tion so if you have a bet­ter way of doing it please feel free to comment!.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes