PHPackages                             gabriel403/g403-translator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. gabriel403/g403-translator

ActiveLibrary[Localization &amp; i18n](/categories/localization)

gabriel403/g403-translator
==========================

Extension to zend translator to support loading translations from db.

v1.0(13y ago)41041PHPPHP &gt;=5.3.3

Since Sep 14Pushed 13y ago2 watchersCompare

[ Source](https://github.com/gabriel403/G403Translator)[ Packagist](https://packagist.org/packages/gabriel403/g403-translator)[ Docs](https://github.com/gabriel403/G403Translator)[ RSS](/packages/gabriel403-g403-translator/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Sample, skeleton module for use with the ZF2 MVC layer.

### Post install: db schema

[](#post-install-db-schema)

```
CREATE TABLE IF NOT EXISTS `locale` (
  	`locale_id` char(5) NOT NULL,
  	`locale_plural_forms` varchar(255) DEFAULT NULL,
  	PRIMARY KEY (`locale_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `message` (
  	`message_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  	`locale_id` char(5) NOT NULL,
  	`message_domain` varchar(255) NOT NULL,
  	`message_key` text NOT NULL,
  	`message_translation` text NOT NULL,
  	`message_plural_index` tinyint(3) unsigned NOT NULL,
  	PRIMARY KEY (`message_id`),
  	KEY `locale_id` (`locale_id`),
  	KEY `message_domain` (`message_domain`),
  	CONSTRAINT `message_locale` FOREIGN KEY (`locale_id`) REFERENCES `locale` (`locale_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

```

### Post install: zend\\db

[](#post-install-zenddb)

If you don't already have a database set up, set this up in your config/autoload/db.global.php

```
$dbParams = array(
    'database'  => 'changeme',
    'username'  => 'changeme',
    'password'  => 'changeme',
    'hostname'  => 'changeme',
);

return array(
    'service_manager' => array(
        'factories' => array(
            'Zend\Db\Adapter\Adapter' => function ($sm) use ($dbParams) {
                return new Zend\Db\Adapter\Adapter(array(
                    'driver'    => 'pdo',
                    'dsn'       => 'mysql:dbname='.$dbParams['database'].';host='.$dbParams['hostname'],
                    'database'  => $dbParams['database'],
                    'username'  => $dbParams['username'],
                    'password'  => $dbParams['password'],
                    'hostname'  => $dbParams['hostname'],
                ));
            },
        ),
    ),
);

```

### Post install: configuration

[](#post-install-configuration)

You need to create a config file, such as config/autoload/translator-db.global.php You need to specify the right translator as service manager factory. You need to specify the type option of translation\_db as database, provide an alias or instance as the db and you can either use the default table names by not specifying any or override them.

```
'service_manager' => array(
    'factories' => array(
        'translator'            => 'G403Translator\Translator\DatabaseTranslatorServiceFactory',
    ),
),
'translator' => array(
    'locale' => 'en_US',
    'translation_db' => array(
        array(
            'type'                  => 'database',
            'db'          			=> 'Zend\Db\Adapter\Adapter',
            'locale_table_name'     => 'locale',
            'messages_table_name'   => 'message'
        ),
    ),
),

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4986d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8eead2f413dc6c16192320a2529534ed3f145c4f523fcadcc6af85c6be578f2c?d=identicon)[gabriel403](/maintainers/gabriel403)

---

Top Contributors

[![EvanDotPro](https://avatars.githubusercontent.com/u/5607?v=4)](https://github.com/EvanDotPro "EvanDotPro (13 commits)")[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (7 commits)")[![SocalNick](https://avatars.githubusercontent.com/u/294123?v=4)](https://github.com/SocalNick "SocalNick (5 commits)")[![akrabat](https://avatars.githubusercontent.com/u/33135?v=4)](https://github.com/akrabat "akrabat (1 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (1 commits)")[![sasezaki](https://avatars.githubusercontent.com/u/42755?v=4)](https://github.com/sasezaki "sasezaki (1 commits)")[![Freeaqingme](https://avatars.githubusercontent.com/u/33034?v=4)](https://github.com/Freeaqingme "Freeaqingme (1 commits)")[![BinaryKitten](https://avatars.githubusercontent.com/u/67553?v=4)](https://github.com/BinaryKitten "BinaryKitten (1 commits)")[![cgmartin](https://avatars.githubusercontent.com/u/490760?v=4)](https://github.com/cgmartin "cgmartin (1 commits)")

---

Tags

zf2

### Embed Badge

![Health badge](/badges/gabriel403-g403-translator/health.svg)

```
[![Health](https://phpackages.com/badges/gabriel403-g403-translator/health.svg)](https://phpackages.com/packages/gabriel403-g403-translator)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
