connectsb/localebundle 问题修复 & 功能扩展

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

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

connectsb/localebundle

Composer 安装命令:

composer require connectsb/localebundle

包简介

Bundle for managing locales

README 文档

README

With this bundle you can get the country names of locales.

1) Installation

First you have to add the folowing lines to your composer.json file:

{
    "require": {
        "connectsb/localebundle": "dev-master"
    }
}

You also have to add the LocaleBundle to your AppKernel.php:

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            ...
            new ConnectSB\TranslationBundle\ConnectSBLocaleBundle()
        );
    }
}

2) Usage

In the controller you can get the country of the language with the following method:

    $this->get('connect_sb_locale_service')->getCountryOfLocale('en');

In Twig you can use the locale_to_country filter.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-16