定制 pixelairport/locale 二次开发

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

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

pixelairport/locale

最新稳定版本:v1.0.11

Composer 安装命令:

composer require pixelairport/locale

包简介

Locale translation arrays for currency, languages and countries.

README 文档

README

If you need full arrays with locales, currencies, countries or languages in different languages, you can simply add this to your project.

Install

Open terminal (or other command line tool) and open your project root directory and run:

composer requrie pixelairport/locale

How to use it

After add it to your project you are able to call following functions to get the arrays by language:

<?php

// Load pixelairport/locale to your file
use Pixelairport\Locale\Currency;
use Pixelairport\Locale\Country;
use Pixelairport\Locale\Language;
use Pixelairport\Locale\Locale;

// Sample class
class Product {

    public function getSingleLanguage(){
        return Language::get('en','de'); // Returns the german name for english. In this example "Englisch".
    }

    public function languages(){
        return Language::all('de'); // Returns an array with all languages in german
    }
	
}

?>

The method Language::all() returns all languages. First parameter is to set the language and second is optional for the filetype. The value "php" is the default, but you can also use "csv" or "json" for example. The package is based on data files of github.com/umpirsky.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固