caouecs/laravel-lang
最新稳定版本:7.0.3
Composer 安装命令:
composer require caouecs/laravel-lang
包简介
Languages for Laravel
关键字:
README 文档
README
In this repository, you can find the lang files for the framework PHP, Laravel 4/5/6/7.
News
- in version 6.1, we propose a new file by language:
validation-inline.php( see #1268 ) - in version 7, we propose new directory names to follow ISO-15897 ( see #1269 )
Install
Via Composer
Install the Laravel-lang package to your Laravel project with composer using command from the table below based on the version of Laravel you are using:
| Laravel version | Composer command |
|---|---|
| Laravel 7.x and new directory names | composer require laravel-lang/lang:~7.0 |
| Laravel 7.x | composer require laravel-lang/lang:~6.1 |
| Laravel 6.x | composer require laravel-lang/lang:~5.0 |
| Laravel 5.8 | composer require laravel-lang/lang:~4.0 |
| Laravel 5.1-5.7 | composer require laravel-lang/lang:~3.0 |
| Laravel 5 | composer require laravel-lang/lang:~2.0 |
| Laravel 4 | composer require laravel-lang/lang:~1.0 |
Copy files
After adding the dependency using composer (as described above) to your application you can find the language files under the directory vendor/laravel-lang/lang.
Copy the folders (and JSON files) of languages that you want to use, into the directory resources/lang of your Laravel application (or app/lang in Laravel 4).
Via GitHub
- Clone the GitHub repository : git clone https://github.com/Laravel-Lang/lang.git
- Or download the zip file
- Choose the branch:
laravel4for Laravel 4 projectmasterfor Laravel 5, 6, 7 projects
- Copy the folders of languages that you want, in
resources/langfolder of your Laravel application (orapp/langin Laravel 4).
Via SVN
Run this in your project directory:
# Laravel 5: svn export https://github.com/Laravel-Lang/lang/trunk/src/[language-code] resources/lang/[language-code] # Laravel 4: svn export https://github.com/Laravel-Lang/lang/branches/laravel4/[language-code] app/lang/[language-code]
Replace [language-code] by any of the languages listed here.
Usage [Laravel only]
In the file config/app.php, change the value of locale by the short name of your language (app/config/app.php in Laravel 4).
Contributing
Please see CONTRIBUTING for details.
Status of files
- Check the todo.md file to see the missing translations.
Projects based on this package
- LaravelLang by ARCANEDEV - Translations manager and checker for Laravel.
- Laravel-lang by overtrue - Command to add languages in your project.
- laravel-lang-publisher by Andrey Helldar - Easy installation and update of translation files for your project.
Credits
caouecs/laravel-lang 适用场景与选型建议
caouecs/laravel-lang 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.89M 次下载、GitHub Stars 达 7, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「languages」 「lang」 「lpm」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 caouecs/laravel-lang 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 caouecs/laravel-lang 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 caouecs/laravel-lang 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easily switch between sites on any page of your website.
Laravel Localization in JavaScript
Deepl Automated translations for Laravel lang files
Search for untranslated keys in your Laravel project
A PHP library providing ISO 639-1 data.
A plugin for Laravel Lang that provides generic term translations for Laravel.
统计信息
- 总下载量: 1.89M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 35
- 点击次数: 23
- 依赖项目数: 29
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 未知