定制 devitek/yaml-translation 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

devitek/yaml-translation

最新稳定版本:4.1.0

Composer 安装命令:

composer require devitek/yaml-translation

包简介

Add YAML file support to Laravel TranslationServiceProvider

README 文档

README

SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License

This package uses Symfony/Yaml parser.

Installing

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

composer require devitek/yaml-translation

And select version: 4.*

Finally, publish all vendor assets to create a yaml-translation.php:

php artisan vendor:publish

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 :) !

统计信息

  • 总下载量: 44.87k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 33
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 33
  • Watchers: 3
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-01