2017 © Pedro Peláez
 

library laravel-lang-tools

Some Language Import/Export tools for Laravel

image

tlr/laravel-lang-tools

Some Language Import/Export tools for Laravel

  • Friday, February 13, 2015
  • by tedslittlerobot
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,612 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Laravel Language Utils

A language export and import command for Laravel 4. (yes, laravel 5 is coming...), (*1)

When dealing with agencies and companies who translate programming projects and websites into other languages, they often request it in certain formats., (*2)

  • Currently works with csv only

Installation

Add the following to your composer.json's require object:, (*3)

"tlr/laravel-lang-tools": "1.x", (*4)

Then, add Tlr\LaravelLangTools\LaravelLangToolsServiceProvider to the providers array in config/app.php., (*5)

Usage

The package provides two CLI commands:, (*6)

artisan lang:export

Running php artisan lang:export will display the current lang tokens, and all of their translations in a table in the terminal - in a similar manner to viewing laravel's routes., (*7)

Running php artisan lang:export --format csv > translations.csv will save a csv of all of the translations, and their keys, to a csv file. This can be sent to translators., (*8)

artisan lang:import

Running php artisan lang:import translations.csv will convert a csv file (in the same format as the one outputted) into a laravel-style lang directory structure, with lang.php files in. At the moment, the path to the provided file must be relative to the project directory., (*9)

By default, the output is saved to a directory called lang in your project's root directory. You can pass a relative path as a third argument to change this. The target directory must not already exist., (*10)

Notes for translators

You may want to give translators some notes from laravel's localization docs page - especially regarding variables, and pluralisation., (*11)

The Versions

13/02 2015

dev-master

9999999-dev

Some Language Import/Export tools for Laravel

  Sources   Download

The Requires

 

The Development Requires

by Stef Horner

13/02 2015

dev-develop

dev-develop

Some Language Import/Export tools for Laravel

  Sources   Download

The Requires

 

The Development Requires

by Stef Horner

13/02 2015

v1.0.0

1.0.0.0

Some Language Import/Export tools for Laravel

  Sources   Download

The Requires

 

The Development Requires

by Stef Horner