定制 cares0107/translatable 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

cares0107/translatable

最新稳定版本:1.1.11

Composer 安装命令:

composer require cares0107/translatable

包简介

This is laravel translatable package

README 文档

README

The Translatable package is a powerful tool designed for Laravel applications that require dynamic translation management across multiple languages. It automates the process of scanning your Laravel project for translation keys and ensures that each key is properly defined in the corresponding JSON translation files for every language specified in your configuration. With Translatable, you can easily maintain and update your application's translations, making it an essential package for developers aiming to provide a multilingual user experience.

Key features include:

  1. Automatic Scanning: Scours PHP files throughout your Laravel application to identify all instances of translation keys.
  2. Dynamic Translation Management: Automatically updates JSON translation files for each configured language, ensuring that no translation key is left undefined.
  3. Configurable and Extensible: Offers flexible configuration options, including customizable paths for scanning and exclusion rules to skip directories like vendor or node_modules.
  4. Streamlined Localization Workflow: Simplifies the localization process, making it easier to manage translations across large and complex applications. Whether you're building a small project or a large enterprise application, Translatable helps keep your translations organized and in sync, facilitating a smoother development process and a better user experience for multi-language applications.

Installation

You can install the package via composer:

composer require cares0107/translatable

You can publish the config file with:

php artisan vendor:publish --tag="translatable-config"

This is the contents of the published config file:

return [
    'available_countries' => [
            'en', 'nl',
        ],

    'translation_files_path' => base_path(),

    'exclude_paths' => [
        '/vendor/',
        '/node_modules/',
        '/frontend/',
        '/website/',
        '/database/',
        '/.git/',
        '/.github/',
    ],
];

Usage

php artisan app:check-translations

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-08