2017 © Pedro Peláez
 

library yii2-dbtranslate

Translation package for database storage of translations

image

maniakalen/yii2-dbtranslate

Translation package for database storage of translations

  • Tuesday, April 17, 2018
  • by maniakalen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 21 Versions
  • 0 % Grown

The README.md

yii2-translations

PHP db translations engine, (*1)

The package is also available in packagist: "maniakalen/yii2-dbtranslate", (*2)

To enable the module inside the yii2 you need to define the module in the main config module part:, (*3)

'translations' => [
    'class' => 'maniakalen\i18n\Module'
],

You also need to add the module key to the bootstrap list:, (*4)

'bootstrap' => [..., 'translations'],

Then you will need to run the module migrations, (*5)

yii migrate/up --migrationPath="@translations/migrations/"

The categories are automatically registered in the translation system when module is bootstrapped., (*6)

In project when you have translations in database you can retreive by using:, (*7)

Yii::t('<category>', '<label>');

Admin interface can be configured for Menu widget for example as:, (*8)

[
    'label' => function() { return Yii::t('yii', 'Translations control'); },
    'url' => ['/translations/admin/languages'],
    'visible' => function() { return Yii::$app->user->can('backend/translations/access'); },
    'active' => function(ActionEvent $event) {
        return strpos($event->action->getUniqueId(), 'translations/admin') === 0;
    },
    'items' => [
        [
            'label' => function() { return Yii::t('yii', 'Languages control'); },
            'url' => ['/translations/admin/languages'],
            'active' => function(ActionEvent $event) {
                return strpos($event->action->getUniqueId(), 'languages') !== false;
            },
        ],
        [
            'label' => function() { return Yii::t('yii', 'Translations control'); },
            'url' => ['/translations/admin/translations'],
            'active' => function(ActionEvent $event) {
                return strpos($event->action->getUniqueId(), 'admin/translations') !== false;
            },
        ]
    ]
]    

But you will need to provide the functionality to execute the inline callback methods. For example I use a class like MenuBehavior which has a beforeAction event and parses this configuration to a correct Menu config., (*9)

TODO: Include module for modal confirmation window, (*10)

The Versions

17/04 2018

dev-master

9999999-dev

Translation package for database storage of translations

  Sources   Download

proprietary Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

17/04 2018

2.1.5

2.1.5.0

Translation package for database storage of translations

  Sources   Download

proprietary

The Requires

 

by Petar Ivanov

php

17/04 2018

2.1.4

2.1.4.0

Translation package for database storage of translations

  Sources   Download

proprietary

The Requires

 

by Petar Ivanov

php

21/11 2017

2.1.3

2.1.3.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

08/11 2017

2.1.2

2.1.2.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

08/11 2017

2.1.1

2.1.1.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

08/11 2017

2.1.0

2.1.0.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

07/11 2017

2.0.3

2.0.3.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

07/11 2017

2.0.1

2.0.1.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

07/11 2017

2.0.2

2.0.2.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

03/11 2017

1.1.0

1.1.0.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

31/10 2017

1.0.9

1.0.9.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

31/10 2017

1.0.8

1.0.8.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

31/10 2017

1.0.7

1.0.7.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

30/10 2017

1.0.5

1.0.5.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

30/10 2017

1.0.6

1.0.6.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

30/10 2017

1.0.4

1.0.4.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

30/10 2017

1.0.3

1.0.3.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

30/10 2017

1.0.2

1.0.2.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

30/10 2017

1.0.1

1.0.1.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php

30/10 2017

1.0.0

1.0.0.0

Translation package for database storage of translations

  Sources   Download

Open Software License (OSL 3.0)

The Requires

 

by Petar Ivanov

php