Featured Post

Dodatkowy odstęp od górnej krawędzi w HTML5

Tym razem po polsku… bo nie tylko po angielsku będę tu pisał Swoje pierwsze kroki z HTML5 mam już za sobą i chciałbym podzielić się pewnym zaskakującym działaniem nowych tagów. Otóż mój przykładowy dokument HTML wyglądał tak: Przykład użycia SubForm z ZF1 w HTML5 Kod źródłowy...

Read More

Localizing application in Zend Framework 2

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 29-03-2013

Tags: , , , , , , , , , , ,

1

Today I would like to focus on translating application in Zend Framework 2.

Overview

By default, tutorial application has included Zend\I18n\Translator\Translator configuration in /module/Application/config/module.config.php as follow:

It has also attached translation files in gettext format under the /module/Application/language directory.

There is over a dozen files like en_US.mo and en_US.po. You can edit .PO files (gettext source) with Poedit – a free, open source and cross-platform gettext catalog editor.

.MO file is automatically created (compiled), when you save the .PO file.

Program has very intuitive interface and looks like that:

Poedit - main window

Poedit – main window

There was missing Polish translation, so I created it on my own.

Writing DQL statements

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 21-03-2013

Tags: , , , , , , , , , ,

0

Today I would like to focus on something, what Doctrine 1.x users know, but it looks a little bit different – Doctrine Query Language (DQL) statements.

In the last tutorial we had had working Album Controller, which was using Doctrine Entity Manager, to get the Album data. Now we will focus on something more advanced – writing SQL alike statements to get some data from the album’s table.

So lets begin…