2017 © Pedro Peláez
 

library yii2-i18ncontent

Show text widgets, pages, articles in chosen language

image

omcrn/yii2-i18ncontent

Show text widgets, pages, articles in chosen language

  • Wednesday, May 2, 2018
  • by arboshiki
  • Repository
  • 3 Watchers
  • 1 Stars
  • 386 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 51 Versions
  • 4 % Grown

The README.md

i18n content module for Yii2 framework

yii2-i18ncontent is yii2 module for creating several types of contents in different languages. It support creating the following contents:, (*1)

  • Translatable article categories and articles
  • Translatable Pages
  • Carousels with translatable caption texts
  • Translatable portions of text.
  • Menu contents (Non translatable yet)

Installation

  1. Run composer require omcrn/yii2-i18ncontent or add "omcrn/yii2-i18ncontent": "~2.0.0" in your projects composer.json.
  2. Make sure you have user table in your database with primary key id.
  3. Run migrations to create tables by php console/yii migrate --migrationPath=@yii/i18n/migrations from projects root directory
  4. Run migrations to create tables by php console/yii migrate --migrationPath=@vendor/omcrn/yii2-i18ncontent/migrations from projects root directory

Configuration

Add the following code in projects configuration file under modules section, (*2)

'i18ncontent' => [
    'class' => 'centigen\i18ncontent\Module',
    'defaultLayout' => '/admin', //Default layout which will be used for rendering i18ncontent pages
],

Add the following code in project's configuration file under components section, (*3)

"i18n" => [
    "translations" => [
        '...',
        'i18ncontent' => [
            'class' => 'yii\i18n\PhpMessageSource',
            'basePath' => '@vendor/omcrn/yii2-i18ncontent/messages',
        ],
    ]
]
'formatter' => [
    'class' => 'centigen\base\i18n\Formatter'
],
'i18ncontent' => [
    'class' => 'centigen\i18ncontent\I18nContent',
    'userClass' => 'common\models\User', //User model class. If you do not have user model, generate it from user table. Make sure this models extends \yii\db\ActiveRecord class
    'mediaUrlPrefix' => null, //In texts which may contain <img> or other media object tags (texts which come from WYSIWYG editors)
                             // `$mediaUrlPrefix` strings are replaced with `$mediaUrlReplacement` string when calling `Html::encodeMediaItemUrls`
                             // and vice versa when calling `Html::decodeMediaItemUrls`
    'mediaUrlReplacement' => '{{media_item_url_prefix}}' //See `$mediaUrlPrefix`
],

Add availableLocales array to application configuration params array., (*4)

For each language listed here tab will be displayed to provide content., (*5)

'params' => [
    '...',
    'availableLocales' => [
        'en-US' => 'English',
        'ru-RU' => 'Русский'
        ...
    ],
]

Urls for administration

Append the following urls to the domain to see administration pages, (*6)

Content Url
Article categories i18ncontent/article-category/index
Articles i18ncontent/article/index
Pages i18ncontent/page/index
Text widgets i18ncontent/widget-text/index
Carousels i18ncontent/widget-carousel/index
Menus i18ncontent/widget-menu/index

The Versions

02/05 2018

dev-master

9999999-dev

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

02/05 2018
17/04 2018
24/03 2018
22/02 2018
22/02 2018
21/02 2018
21/02 2018
23/11 2017

1.1.18

1.1.18.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

13/11 2017

1.1.17

1.1.17.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

11/11 2017

1.1.16

1.1.16.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

10/11 2017

1.1.15

1.1.15.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/10 2017

1.1.14

1.1.14.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/10 2017

1.1.13

1.1.13.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

19/10 2017

1.1.12

1.1.12.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

21/07 2017

1.1.11

1.1.11.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

20/06 2017

1.1.10

1.1.10.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

20/06 2017
19/06 2017
19/06 2017
27/02 2017

dev-dbmenu

dev-dbmenu

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

14/02 2017
01/02 2017
01/02 2017
30/01 2017
27/01 2017
27/01 2017
27/01 2017
26/01 2017
26/01 2017
26/01 2017

1.0.3

1.0.3.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/01 2017

1.0.2

1.0.2.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/01 2017

1.0.1

1.0.1.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/01 2017

1.0.0

1.0.0.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

24/01 2017

v0.3.6

0.3.6.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

17/01 2017

v0.3.5

0.3.5.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

17/01 2017

v0.3.4

0.3.4.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

17/01 2017

v0.3.3

0.3.3.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

10/01 2017

v0.3.2

0.3.2.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

09/01 2017

v0.3.1

0.3.1.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

28/12 2016

v0.3.0

0.3.0.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

27/12 2016

v0.2.0

0.2.0.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

27/12 2016

v0.1.8

0.1.8.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.7

0.1.7.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.6

0.1.6.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.5

0.1.5.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.4

0.1.4.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.3

0.1.3.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.2

0.1.2.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.1

0.1.1.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages

26/12 2016

v0.1.0

0.1.0.0

Show text widgets, pages, articles in chosen language

  Sources   Download

The Requires

 

yii2 module cms i18n articles i18n carousels i18n pages