承接 betterapp/laravel-yaml-translation 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

betterapp/laravel-yaml-translation

Composer 安装命令:

composer require betterapp/laravel-yaml-translation

包简介

Add YAML file support to Laravel TranslationServiceProvider, fork of jackjoe/yaml-translation

README 文档

README

Latest Version Monthly Downloads

Add Yaml file support for Laravel 10 TranslationServiceProvider

This package uses Symfony/Yaml parser, and is forked from jackjoe/laravel-yaml-translation

Installation

Composer

Add Laravel Localization to your composer.json file.

"betterapp/laravel-yaml-translation": "^1.0"

Run composer install to get the latest version of the package.

Manually

It's recommended that you use Composer, however you can download and install from this repository.

Add support in Laravel

You have to replace

'Illuminate\Translation\TranslationServiceProvider',

with

'betterapp\Core\Translation\TranslationServiceProvider',

in config/app.php.

How to use

Instead of using the regular php files to input your translation, use yml or yaml files instead.

PHP:

<?php

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

Will in YAML be equivalent to:

hello: Hello :name
author: Jack + Joe

A more complex example:

title: My Website
copyright: |
  2015 &copy;

team:
  - name: Foo
    age: 18
  - name: Bar
    age: 20

Important!

When you want to use the yaml files, be sure to delete the php files!

License

Copyright © 2019 Jack + Joe. This is free software, and may be redistributed under the terms specified in the LICENSE file.

统计信息

  • 总下载量: 375
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固