composer require mikica/zf2-translate-plugin
composer require mikica/zf2-translate-plugin "^1.0"
You need to register new module. Add in file config/application.config.php:
'modules' => array(
'...',
'ZfTranslate'
),
The module is ready to use.
<?php
$this->translate('translate word');
$this->translate('translate word', 'locale');