承接 vwinck-dev/laravel-translator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vwinck-dev/laravel-translator

最新稳定版本:v0.1.0

Composer 安装命令:

composer require vwinck-dev/laravel-translator

包简介

Translation files and localization utilities for Laravel.

README 文档

README

Packagist Version Total Downloads License CI Status

Translation files and localization utilities for Laravel - publish, manage and extend your app's translations with a single Artisan command.

Features

  • Auto-discovery - zero configuration, works out of the box with Laravel's package system
  • Artisan integration - publish and update translations via lang:update
  • JSON-based - simple, human-readable translation files
  • Multi-locale - grow your supported languages incrementally
  • CI/CD ready - version-controlled translations that fit neatly into automated pipelines

Requirements

  • PHP 8.1+
  • Laravel ^10.x

Installation

composer require vwinck-dev/laravel-translator

The package registers itself automatically via Laravel's auto-discovery. No manual provider or alias registration needed.

Publishing Translations

To publish the translation files to your application's lang/ directory, run:

php artisan lang:update

Alternatively, use the standard Artisan vendor publish command:

php artisan vendor:publish --tag=translations

Available Locales

Locale Language Status
en English
pt_BR Portuguese (Brazil)

Want to add a new locale? See Contributing.

Project Structure

lang/
├── en.json       # English (base)
└── pt_BR.json    # Portuguese (Brazil)

Each file is a flat JSON map of the original string to its translation - compatible with Laravel's __() and trans() helpers out of the box.

Usage

Use Laravel's built-in translation helpers anywhere in your application:

// Blade
{{ __('Attach files by dragging & dropping, selecting or pasting them.') }}

// PHP
__('Attach files by dragging & dropping, selecting or pasting them.');

The corresponding pt_BR.json entry:

{
  "Attach files by dragging & dropping, selecting or pasting them.": "Anexe arquivos arrastando, selecionando ou colando."
}

Roadmap

  • Missing translation detection
  • Translation diff command
  • Vendor package translation support
  • Remote synchronization
  • Automatic merge support
  • Per-locale installer commands

Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/your-locale
  3. Commit your changes: git commit -m 'feat: add fr locale'
  4. Push and open a Pull Request

Please follow the existing file naming conventions and ensure your JSON is valid before submitting.

License

Distributed under the MIT License. © vwinck-dev

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固