2017 © Pedro Peláez
 

library laravel-translate

Translation manager for Laravel 5

image

philo/laravel-translate

Translation manager for Laravel 5

  • Friday, August 5, 2016
  • by PhiloNL
  • Repository
  • 9 Watchers
  • 87 Stars
  • 24,666 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 11 Forks
  • 7 Open issues
  • 13 Versions
  • 2 % Grown

The README.md

Translation manager for Laravel 5

, (*1)

Managing translations can be a pain, switching between different language files, adding new strings, keeping everything in sync and removing translations which are no longer being used., (*2)

But that's in the past if you install this package!, (*3)

Features

Lets take a look at all the features included in this package., (*4)

Adding new translations

To add a new translation you need to open your terminal, and run the following command:, (*5)

php artisan translate:add [--bench[="..."]] [--no-entities] <group> <line>, (*6)

So for a example: php artisan translate:add profile first_name, (*7)

1, (*8)

As you can see, you will get the blade syntax returned so you can copy and paste it to your view. Adding variables to your string will result in a different syntax: php artisan translate:add profile texts.introduction, (*9)

2, (*10)

Translation files are dynamically generated in alphabetical order and equally spaced., (*11)

3, (*12)

Removing translations

To remove translations you can use the remove command which has the same syntax as the add command:, (*13)

php artisan translate:remove account upgrade, (*14)

4, (*15)

Clean up

The clean up command will search your files for language strings which are no longer used., (*16)

php artisan translate:cleanup, (*17)

5, (*18)

Foreach line that was not found, you will get a confirmation if you want to delete the line in question. In case you you don't want to confirm each line, you can add the --silent parameter., (*19)

php artisan translate:cleanup --silent, (*20)

By default the clean up command will look through all your language files. In case you want to focus on one specific group, you can add the --group="account" parameter., (*21)

php artisan translate:cleanup --group="account", (*22)

Installation

The package can be installed via Composer by requiring the "philo/laravel-translate": "~2.0" package in your project's composer.json., (*23)

{
    "require": {
        "laravel/framework": "5.*",
        "philo/laravel-translate": "~2.0"
    },
    "minimum-stability": "dev"
}

Next you need to add the service provider to app/config/app.php, (*24)

'providers' => array(
    /*
     * Application Service Providers...
     */
    'Philo\Translate\TranslateServiceProvider',
)

Config

You can publish the config file in case you want to make some adjustments to the clean up command: php artisan vendor:publish, (*25)

<?php
return array(
    'search_ignore_folders' => array('commands', 'config', 'database', 'lang', 'start', 'storage', 'tests'),
    'search_exclude_files'  => array('pagination', 'reminders', 'validation'),
    'digg_folders'          => array('app/models', 'app/views', 'app/controllers'),
);

Notes

When you start using the translation manager you need to make sure that all your translation files are in sync., (*26)

The Versions

05/08 2016

dev-master

9999999-dev

Translation manager for Laravel 5

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

05/08 2016

v2.0.2

2.0.2.0

Translation manager for Laravel 5

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

02/02 2015

5.0.x-dev

5.0.9999999.9999999-dev

Translation manager for Laravel 5

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

02/02 2015

v2.0.1

2.0.1.0

Translation manager for Laravel 5

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

02/02 2015

v2.0.0

2.0.0.0

Translation manager for Laravel 5

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

12/11 2014

4.0.x-dev

4.0.9999999.9999999-dev

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

12/11 2014

v1.0.6

1.0.6.0

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

24/07 2014

v1.0.5

1.0.5.0

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

21/01 2014

v1.0.4

1.0.4.0

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

19/01 2014

v1.0.3

1.0.3.0

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

19/01 2014

v1.0.2

1.0.2.0

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

11/01 2014

v1.0.1

1.0.1.0

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate

05/01 2014

v1.0.0

1.0.0.0

Translation manager for Laravel 4

  Sources   Download

MIT

The Requires

 

by Philo Hermans

laravel translation manager translate