slgo99/laravel-loco-tms 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

slgo99/laravel-loco-tms

最新稳定版本:v1.0.3

Composer 安装命令:

composer require slgo99/laravel-loco-tms

包简介

A Laravel convenience integration for the Loco translation management system

README 文档

README

This is an integration with the Loco Translation Management System.

Installation

composer require slgo99/laravel-loco-tms

Configuration

To use the library, you'll need to set your Loco API Key for your translation project. Set the environment variable LOCO_API_KEY.

Then you'll need to publish the configuration file.

To publish the configuration file, run:

php artisan vendor:publish --provider="Jobilla\Loco\LocoServiceProvider"

This will create a loco.php file in your config directory.

The configuration file should look like this:

return [
    'api_key' => env('LOCO_API_KEY'),
    'lang_path' => resource_path('lang'),
];

The lang_path is the path where the translations will be stored. In Laravel 9+ projects, you might need to set the lang_path to base_path('lang').

Usage

Importing translations

To download translations from Loco, run the following command:

php artisan loco:download

This will download all translations from Loco and store them in the lang_path directory.

Exporting translations

To upload translations to Loco, run the following command:

php artisan loco:upload

This will upload all translations from the lang_path directory to Loco.

统计信息

  • 总下载量: 39
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-25