PHPackages                             kaishiyoku/yaml-translation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. kaishiyoku/yaml-translation

AbandonedArchivedLibrary[Localization &amp; i18n](/categories/localization)

kaishiyoku/yaml-translation
===========================

Add YAML file support to Laravel TranslationServiceProvider

6.0.0(6y ago)12.3k[1 issues](https://github.com/Kaishiyoku/laravel-yaml-translation/issues)MITPHPPHP &gt;=7.1.3

Since May 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Kaishiyoku/laravel-yaml-translation)[ Packagist](https://packagist.org/packages/kaishiyoku/yaml-translation)[ RSS](/packages/kaishiyoku-yaml-translation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (13)Used By (0)

[![Maintenance](https://camo.githubusercontent.com/107cdbc6a67ec677b7459f72c05d13f2de1ea897382420addec98c9d70988496/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323031392e737667)](https://camo.githubusercontent.com/107cdbc6a67ec677b7459f72c05d13f2de1ea897382420addec98c9d70988496/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323031392e737667)[![Packagist](https://camo.githubusercontent.com/c31107e2e19c0f050f7b2c8d97c2119315611b76670ae34e1a2f1bec1c0a1c90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6169736869796f6b752f79616d6c2d7472616e736c6174696f6e2e737667)](https://camo.githubusercontent.com/c31107e2e19c0f050f7b2c8d97c2119315611b76670ae34e1a2f1bec1c0a1c90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6169736869796f6b752f79616d6c2d7472616e736c6174696f6e2e737667) [![Packagist](https://camo.githubusercontent.com/1d868660c97399cb120cb12918f0bca5a6a13705e38db20b19d0e8f6a18623d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6169736869796f6b752f79616d6c2d7472616e736c6174696f6e2e737667)](https://camo.githubusercontent.com/1d868660c97399cb120cb12918f0bca5a6a13705e38db20b19d0e8f6a18623d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6169736869796f6b752f79616d6c2d7472616e736c6174696f6e2e737667)

Add Yaml file support for Laravel &gt;=5.4 TranslationServiceProvider
=====================================================================

[](#add-yaml-file-support-for-laravel-54-translationserviceprovider)

This package uses Symfony/Yaml parser. **Note:** This is a fork from the orignal version of Devitek:

Please note
===========

[](#please-note)

Laravel =&gt;5.4 only support for coming =&gt;5.4.\* releases. If you still want to use this package with an older Laravel version use an older release.

The last release with Laravel &lt;= 5.3.\* support is **5.0.1**

**Please note:** As with version 5.5.1 this package is using Symfony Yaml Parser v3.\* and therefore the YAML format has been changed a bit - you now have to escape lines with quotes (either double or single ones) when there are special keys present like a colon, otherwise you'll get an error like this: `A colon cannot be used in an unquoted mapping value at line [...]`. I have slightly changed the example below to demonstrate the changes.

Installing
----------

[](#installing)

Add `"kaishiyoku/yaml-translation": "5.*"` to your **composer.json**by running `php composer.phar require kaishiyoku/yaml-translation`

Add support in Laravel
----------------------

[](#add-support-in-laravel)

Replace `'Illuminate\Translation\TranslationServiceProvider',` with `'Kaishiyoku\Core\Translation\TranslationServiceProvider',` in **app/config/app.php**.

How to use
----------

[](#how-to-use)

Just use regular **php** files or use **yml** or **yaml** files instead. In order to use Yaml your localization files must end with **\*.yml.php**, **\*.yaml.php**, **\*.yml** or **\*.yaml**

### Example

[](#example)

**PHP**:

```
