Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v1.2
2 results

packages_translates

  • Clone with SSH
  • Clone with HTTPS
  • gralias's avatar
    gralias authored
    386c88fe
    History
    Name Last commit Last update
    middleware
    migrations
    src
    composer.json
    readme.md

    NOTE

    Package for laravel 5.1 & 5.2

    _____ 5.1 _____ This packages using "illuminate/html", so please install it before using this package

    1. How to use "illuminate/html" at: https://packagist.org/packages/illuminate/html _____ 5.2 _____ This packages using "laravelcollective/html" instead, so please install it before using this package
    2. How to use "laravelcollective/html" at: https://packagist.org/packages/laravelcollective/html

    ========== After that ==========

    1. You need to add this service provider to: config/app.php

    "Gralias\Translates\TranslateServiceProvider::class"

    1. And publish migrations and router with:

    "php artisan vendor:publish"

    1. Remeber to migrate database (>.<) by typing: php artisan migrate
    2. Test packages at

    yourdomain/translates


    How to use: to generate locale language you must follow this:

    • In view file:
    {!! trans(foo.bar_text_1) !!}
    • 'foo': name of file will save to : resource/lang/en/foo.php.
    • 'bar_text_1': string will be store in file like that
      return ['bar_text_1' => 'bar text 1'];
    • after set some strings in views you must update, translate and export it. Done!

    Video introduce: GRALIAS