2017 © Pedro Peláez
 

library laravel-translator

Custom translator for Laravel enabling translations inside translations

image

thomasgenster/laravel-translator

Custom translator for Laravel enabling translations inside translations

  • Thursday, December 1, 2016
  • by thomasgenster
  • Repository
  • 1 Watchers
  • 0 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

laravel-translator

Custom translator for Laravel that prevents the need to use traditional placeholders for getting a translation inside a translation, (*1)

Add the following to you Providers array (app/config/app.php):, (*2)

Genster\CustomLaravelTranslator\TranslatorProvider, (*3)

Remove/uncomment the default provider:, (*4)

Illuminate\Translation\TranslationServiceProvider, (*5)

Usage:

Use [[ ]] as placeholders to have it be replaced by the corresponding translation key., (*6)

Example:

lang/en/default.php, (*7)

array(
    'hello world' => 'Please contact us at [[contact.phone]]',
)

lang/en/contact.php, (*8)

array(
    'phone' => '+49 12345678'
)

The Versions

01/12 2016

dev-master

9999999-dev

Custom translator for Laravel enabling translations inside translations

  Sources   Download

The Requires

  • php >=5.3.0

 

by Thomas Genster