BsbDoctrineTranslationLoader is a ZF2 module that provides a doctrine powered translation loader.

v1.1.0 2014-11-13 20:20 UTC

This package is auto-updated.

Last update: 2020-01-23 18:11:14 UTC


BsbDoctrineTranslationLoader is a small ZF2 module that provides a Doctrine based translation loader.

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Code Coverage Scrutinizer Code Quality Build Status Dependency Status


php composer.phar require "bushbaby/bsb-doctrine-translation-loader:~1.0"

Then add BsbDoctrineTranslationLoader to the config/application.config.php modules list.

Copy the config/bsb_doctrine_translation_loader.global.php.dist to the config/autoload directory to jump start configuration.

Create the required database tables by importing running;

mysql database < etc/mysql.sql


  • >=PHP5.3
  • >=ZF2.2.2


To configure the module just copy the bsb_doctrine_translation_loader.global.php.dist (you can find this file in the config folder of BsbDoctrineTranslationLoader) into your config/autoload folder, and override what you want.

To enable the loader for a particular text domain add a remote.

return array(
    'translator' => array(
        'remote_translation' => array(
            /* add a remote translation loader for each text domain */
            // array('type' => 'BsbDoctrineTranslationLoader', 'text_domain' => 'default'),
            // array('type' => 'BsbDoctrineTranslationLoader', 'text_domain' => 'other'),

Change the connection

By default BsbDoctrineTranslationLoader will use the orm_default connection which is configured by DoctrineORMModule. If you need to change the connection, change the 'entity_manager' key;

return array(
    'bsb_doctrine_translation_loader' => array(
        'entity_manager' => 'em_identifier',

Note: that is up to you to configure the DoctrineORMModule such that 'em_identifier' exists as a valid connection.