maximebeaudoin / laravel-yaml-translation

A package to add support for yaml translation files in Laravel 5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Yaml file support for Laravel 5 TranslationServiceProvider

This package uses Symfony/Yaml parser.

Installing

Add "devitek/yaml-translation": "1.*" to your composer.json by running :

php composer.phar require devitek/yaml-translation

And select version : 1.*

Add support in Laravel

You have to replace

'Illuminate\Translation\TranslationServiceProvider',

with

'Devitek\Core\Translation\TranslationServiceProvider',

in app/config/app.php.

How to use

Just use regular php files or use yml or yaml files instead.

PHP :

<?php

return [
	'hello' => 'Hello :name',
    'author' => 'Devitek',
];

Will be equivalent to :

YAML

hello: Hello :name
author: Devitek

Enjoy it ! Feel free to fork :) !

About

A package to add support for yaml translation files in Laravel 5


Languages

Language:PHP 100.0%