teamnovu/localize
最新稳定版本:v5.1.1
Composer 安装命令:
composer require teamnovu/localize
包简介
Localize allows you to easily translate i18n files within Statamic
README 文档
README
Localize allows you to easily translate i18n files within Statamic.
Features
- In-Panel Translation: Translate i18n files directly within your Statamic control panel.
- Laravel Localization Support: Works with Laravel's JSON localization files.
- Custom Files: You can define the folder and files to be used for translations.
- JSON API Exposure: Optionally expose your i18n files as a JSON API for use in frontends or other services.
Installation
You can install Localize via the Statamic control panel or using Composer:
Statamic Control Panel
- Go to
Tools > Addonsin your Statamic control panel. - Search for Localize and click Install.
Composer
From your project root, run:
composer require teamnovu/localize
Configuration
Publishing Configuration
After installation, you may wish to publish the package configuration:
php artisan vendor:publish --provider="TeamNovu\\Localize\\LocalizeServiceProvider"
This will create a localize.php config file in your config directory.
Git Integration
If you use Statamic's Git integration and want to track changes to your language files, add the following path to config/statamic/git.php:
'paths' => [ // ... base_path('lang'), ],
API
If you enable the JSON API, your translations can be accessed programmatically. See the package configuration for details.
If not changed the default route is /api/localize/LANG.json
Support
For issues, feature requests, or contributions, please open an issue or pull request on GitHub.
统计信息
- 总下载量: 628
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-07