2017 © Pedro Peláez
 

library polyglot

Translate model column in laravel

image

mammut-alex/polyglot

Translate model column in laravel

  • Tuesday, November 14, 2017
  • by MammutCris
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,420 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 7 % Grown

The README.md

Polyglot

Build Status Total Downloads Latest Stable Version License Code Climate StyleCI, (*1)

Installation

Require this package in your composer.json and update composer., (*2)

"mammut-alex/polyglot": "0.2.*"

or composer require mammut-alex/polyglot, (*3)

Documentation

Translator works with a database, it looks for a prefix code language, (*4)

Here is an example Migration, (*5)

    $table->string('name_en');
    $table->string('name_uk');
    $table->string('name_ru');

To use polyglot, connect it to your model and use feature for translation., (*6)

namespace App;

use Illuminate\Database\Eloquent\Model;
use MammutAlex\Polyglot\Polyglot;

class YouModel extends Model
{
    use Polyglot;

    public function name()
        {
            return $this->translation('name');
        }
    ...

The function will return the translation in the selected language user, (*7)

An example of the use in blade:, (*8)

<h1>{{$model->name()}}</h1>

See more example in tests, documentation being developed, (*9)

The Versions

14/11 2017

dev-master

9999999-dev

Translate model column in laravel

  Sources   Download

MIT

The Requires

  • php >=5.6.4

 

The Development Requires

by Avatar MammutCris

database laravel model translate

14/03 2017

0.2.0

0.2.0.0

Translate model column in laravel

  Sources   Download

MIT

The Requires

  • php >=5.6.4

 

The Development Requires

by Avatar MammutCris

database laravel model translate

14/03 2017

dev-analysis-zE2nlO

dev-analysis-zE2nlO

Translate model column in laravel

  Sources   Download

MIT

The Requires

  • php >=5.6.4

 

The Development Requires

by Avatar MammutCris

database laravel model translate

03/03 2017

0.1.6

0.1.6.0

Translate model column in laravel

  Sources   Download

MIT

The Requires

  • php >=5.6.4

 

The Development Requires

by Avatar MammutCris

database laravel model translate

03/03 2017

0.1.5

0.1.5.0

Translate model column in laravel

  Sources   Download

MIT

The Requires

  • php >=5.6.4

 

The Development Requires

by Avatar MammutCris

database laravel model translate

10/02 2017

0.1.4

0.1.4.0

Organization of DB multilingualism in laravel, easy to switch

  Sources   Download

MIT

The Requires

  • php >=5.6.4

 

The Development Requires

by Avatar MammutCris

laravel translation simple db

10/02 2017

0.1.3

0.1.3.0

Organization of DB multilingualism in laravel, easy to switch

  Sources   Download

MIT

The Requires

  • php >=5.6.4

 

The Development Requires

by Avatar MammutCris

laravel translation simple db

07/02 2017

0.1.2

0.1.2.0

Organization of multilingualism by using Database creates their operating principles of multilingualism but only makes it easy to switch

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar MammutCris

laravel translation simple db

07/02 2017

0.1.1

0.1.1.0

Organization of multilingualism by using Database creates their operating principles of multilingualism but only makes it easy to switch

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar MammutCris

laravel translation simple db

07/02 2017

0.1

0.1.0.0

Organization of multilingualism by using Database creates their operating principles of multilingualism but only makes it easy to switch

  Sources   Download

MTI

The Requires

  • php >=5.4.0

 

by Avatar MammutCris

laravel translation simple db

07/02 2017

0.0.1

0.0.1.0

Trans from DB

  Sources   Download

MTI

The Requires

  • php >=5.4.0

 

by Avatar MammutCris