Skip to content

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

Notifications You must be signed in to change notification settings

pop-mihai/laravel-yaml-translation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Add Yaml file support for Laravel 5 TranslationServiceProvider

SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License

This package uses Symfony/Yaml parser.

Installing

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

php composer.phar require devitek/yaml-translation

And select version : 2.*

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%