markg/tp-lang 问题修复 & 功能扩展

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

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

markg/tp-lang

最新稳定版本:1.0.7

Composer 安装命令:

composer require markg/tp-lang

包简介

README 文档

README

Installation

    // Minimum requirement TP framework 6.1, PHP version 7.2.5
    composer require mark/tp-lang

Instructions

Publish language pack service registration through PHP think service: discover

Execute installation configuration in markg\lang\Service and replace the binding class of framework language pack management class lang
Language package loading path, unchanged for internal framework loading and system language package loading. Added the ability to create directory language packages by country under app/lang

The loading function of other language packs remains unchanged, and extended language pack files can be specified. The country and language need to be concatenated [country language]
    // YourProjectPath/config/lang.php
    $config = [
        'extend_list'=>[
            //'In en'=>__ DIR__. '/App/lang/in/en. php ',
            'In en'=>__ DIR__. '/App/lang/in_en. php ',
        ]
    ];
    // You can switch between different countries through 
    markg\lang\facade\Lang::switchCountry('country','language');
    // Check if the key exists
    markg\lang\facade\Lang::has('key', $range='');
    // Get the value of the key
    markg\lang\facade\Lang::get('key', $vars=[], $range='')

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-18