baselrabia / laravel-translate-message
提供新的辅助函数,负责处理所有翻译麻烦,并为您完成。
1.0.2
2022-01-10 09:43 UTC
Requires
- php: ^7.1.3|^8.0
- illuminate/support: ~5.8.0|^6.0|^7.0|^8.0
This package is auto-updated.
Last update: 2024-09-10 15:41:52 UTC
README
Laravel Translate Message 🥳
本软件包提供新的辅助函数,负责处理所有翻译麻烦,并为您完成。
安装
通过Composer安装此软件包。只需在终端中运行以下命令-
composer require baselrabia/laravel-translate-message
这里有什么新内容 🤔
在这个软件包中,您将获得两个新的辅助函数
// two underscore and t function __t("app.Tranlation Word"); // three underscore Function ___("app.Tranlation Word");
这两个辅助函数是laravel辅助函数trans()和__()的包装,提供从lang文件资源resource/lang/en/app.php中的文本翻译
接下来会发生什么 !!
我们的辅助函数允许您在调用函数时一次性编写消息,它将自动将其翻译并写入resources/lang文件夹,因此如果您想更改自动翻译,您可以在那里编辑它们。
正如您所看到的,它消除了前往每个/lang/..文件夹来为特定语言编写翻译的麻烦。
贡献
如果您认为缺少某些重要内容或应该根据您的经验进行更改,我很乐意听到您的意见!如果您有改进此软件包的建议,请打开一个带有您建议的问题。
如何贡献 💪
- Fork the project
- Create a new branch with your changes:
$ git checkout -b my-feature
- Save your changes and create a commit message telling you what you did:
$ git commit -m "feature: My new feature"
- Submit your changes:
$ git push origin my-feature
许可证 📝
此存储库在MIT许可证下。您可以在LICENSE文件中查看更多详细信息。😉
本项目由@Basel Rabia用❤️开发。
如果您觉得这有帮助,请给它⭐,这也会帮助我。😉
