secretwebmaster/laravel-localization
最新稳定版本:v2.4.1
Composer 安装命令:
composer require secretwebmaster/laravel-localization
包简介
Easy localization for Laravel (forked for WNCMS fixes)
README 文档
README
This package is a maintained compatibility replacement for
mcamara/laravel-localization, kept compatible with WNCMS and modern Laravel.
Release line
2.4.x is the active minor line for the Laravel 13 upgrade track.
- PHP:
^8.4 - Laravel:
^13.0 - Testbench:
^11.0 - PHPUnit:
^12.5
Why this exists
The upstream package is effectively unmaintained for our use case, while WNCMS
depends on locale alias behavior such as tw -> zh_TW.
This fork keeps the original namespaces and public APIs so it can remain a drop-in replacement, while carrying the compatibility fixes needed by WNCMS.
What changed in 2.4.x
- Laravel 13 / PHP 8.4 dependency baseline
- Verified middleware redirect behavior under Laravel 13
- Verified localized URL generation and translated route lookup under Laravel 13
- Fixed translated route generation and lookup when
localesMappingaliases are used
Compatibility
- Same namespaces
- Same service provider
- Same facade
- Same config contract
- Intended as a drop-in replacement for
mcamara/laravel-localization
Validation scope
The package now includes Testbench-based coverage for:
- mapped default locale handling with
hideDefaultLocaleInURL - translated route URL generation
- translated route lookup from alias-based localized URLs
- session-based locale redirection middleware
- hidden default locale redirection middleware
Composer usage
composer require secretwebmaster/laravel-localization:^2.4
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-23