2017 © Pedro Peláez
 

library silex-translation-files

A Silex service provider for using translation files.

image

herrera-io/silex-translation-files

A Silex service provider for using translation files.

  • Thursday, August 15, 2013
  • by kherge
  • Repository
  • 0 Watchers
  • 2 Stars
  • 2,903 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Translation Files

Build Status, (*1)

This is a Silex service provider that extends the existing Translation service in order to more easily support the use of translation files. You can specify the loader, the files, and the locales all as a parameter., (*2)

Example

use Herrera\Silex\Provider\TranslationServiceProvider;
use Silex\Application;

$app = new Application();

$app->register(
    new TranslationServiceProvider(),
    array(
        'translation.files' => array(
            'Symfony\\Component\\Translation\\Loader\\YamlFileLoader' => array(
                '/path/to/file.de.yml' => 'de',
                '/path/to/file.en.yml' => 'en',
                '/path/to/file.fr.yml' => 'fr'
            )
        )
    )
);

$translated = $app['translator']->trans($key);

Installation

Use Composer:, (*3)

$ composer.phar require "herrera-io/silex-translation-files=~1.0"

The Versions

15/08 2013

dev-master

9999999-dev https://github.com/herrera-io/php-silex-translation-files

A Silex service provider for using translation files.

  Sources   Download

MIT

The Requires

 

The Development Requires

silex translation

15/08 2013
15/08 2013