2017 © Pedro Peláez
 

laravel-package system-text-provider

Laravel package to implement system text translations from external service

image

bonnier/system-text-provider

Laravel package to implement system text translations from external service

  • Tuesday, August 22, 2017
  • by alfhen
  • Repository
  • 9 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

System Text Provider

Laravel package that retrieves translations strings from Bonnier microsoervice and extends the laravel __() localization function., (*1)

Setup

  • composer require bonnier/system-text-provider
  • Register the provider in config/app.php
    ...
    'providers' => [
        ...
       Bonnier\SystemText\SystemTextProvider::class, 
    ],
  • Setup configuration in config/services.php
    'systemtext' => [
        'sitemanager' => '{url/to/sitemanager}',
        'microservice' => '{url/to/system-text-service}',
    ]

Get translations

  • run php artisan bonnier:fetch [--force]

Use translations

Use Laravels own translation helper functions ( __('key') and trans('key') ) with the following structure:, (*2)

echo __('bonnier::{appcode}/{brandcode}/messages.{translation_key}'); => echo __('bonnier::brand_site/gds/messages.welcome');, (*3)

The Versions

22/08 2017

dev-master

9999999-dev

Laravel package to implement system text translations from external service

  Sources   Download

The Requires

 

22/08 2017

1.2

1.2.0.0

Laravel package to implement system text translations from external service

  Sources   Download

The Requires

 

22/08 2017

1.1

1.1.0.0

Laravel package to implement system text translations from external service

  Sources   Download

The Requires

 

18/08 2017

v1.0

1.0.0.0

Laravel package to implement system text translations from external service

  Sources   Download

The Requires