Download the PHP package webman-tech/laravel-translation without Composer
On this page you can find all versions of the php package webman-tech/laravel-translation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download webman-tech/laravel-translation
More information about webman-tech/laravel-translation
Files in webman-tech/laravel-translation
Download webman-tech/laravel-translation
More information about webman-tech/laravel-translation
Files in webman-tech/laravel-translation
Vendor webman-tech
Package laravel-translation
Short Description Webman plugin webman-tech/laravel-translation
License MIT
Package laravel-translation
Short Description Webman plugin webman-tech/laravel-translation
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-translation
webman-tech/laravel-translation
Split from webman-tech/laravel-monorepo
适用于 webman 的 Laravel 翻译组件,基于 illuminate/translation 实现。
安装
简介
该组件将 Laravel 强大的翻译和本地化功能引入 webman 框架中,提供了多语言支持和参数替换等功能。
所有方法和配置与 Laravel 几乎一致,因此使用方式可完全参考 Laravel Localization 文档。
特殊使用说明
翻译函数名称
由于 webman 下默认使用 symfony/translation,且已经定义过 trans 方法,为了不冲突,此处使用 transL():
语言切换
因为没有 Laravel App 的存在,所以不能通过 App::setLocale() 和 App::currentLocale() 来切换语言。
本扩展已经做到根据 locale() 自动切换 transL()、trans_choice()、__() 下使用的语言包,无需开发手动设置。
基本使用
All versions of laravel-translation with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
illuminate/translation Version ^12.0
webman-tech/common-utils Version ^5.0 || dev-main
illuminate/translation Version ^12.0
webman-tech/common-utils Version ^5.0 || dev-main
The package webman-tech/laravel-translation contains the following files
Loading the files please wait ...