andrey-helldar/lang-translations

此包已被弃用且不再维护。作者建议使用laravel-lang/http-statuses包。

Laravel项目的扩展翻译

v4.0.0 2021-04-15 19:39 UTC

README

支持78种语言的翻译。

lang translations

Stable Version Unstable Version Total Downloads License

注意

此包已被弃用。请使用laravel-lang/http-statuses代替。

安装

要获取Lang Translations库的最新版本,只需使用Composer引入项目。

$ composer require andrey-helldar/lang-translations --dev

当然,您也可以手动更新您的require块并运行composer update

{
    "require": {
        "andrey-helldar/lang-translations": "^4.0"
    }
}

使用

注意!

仅指定命名空间是不够的 - 翻译管理器不会安装额外的包 - 它使用已安装的包,所以请不要忘记安装它。

从版本4.0开始,此项目将不包含安装代码,只有本地化文件。

要将此存储库中的文件安装到您的项目中,您需要安装andrey-helldar/laravel-lang-publisher,并在其配置中指定此项目的命名空间。

例如

// config/lang-publisher.php

<?php

return [
    // ...

    /*
     * Determines from which packages to synchronize localization files.
     *
     * A prerequisite is compliance with a single file placement format:
     *
     * source/
     * locales/
     *   af/
     *     af.json
     *     <filename>.php
     *   <locale>/
     *     <locale>.json
     *     <filename>.php
     */

    'packages' => [
        'andrey-helldar/lang-translations',
    ],
];

许可证

此包遵循MIT许可证

企业版

作为Tidelift订阅的一部分提供。

andrey-helldar/lang-translations的维护者以及成千上万的其他包维护者正在与Tidelift合作,为构建您应用程序所使用的开源包提供商业支持和维护。节省时间,降低风险,并提高代码质量,同时支付您实际使用的包的维护者。了解更多信息:点击这里