baconmanager/language-bundle

这个symfony2的bundle包

安装: 506

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 4

分支: 0

开放问题: 0

类型:symfony-bundle

v0.1 2016-01-05 20:30 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:09:44 UTC


README

Codacy Badge Latest Stable Version License SensioLabsInsight

这个bundle负责为Manager添加和管理语言功能,其中包含完整的CRUD操作以及更改语言和返回之前页面的路由。

安装

要安装这个bundle,只需运行以下命令:

$ composer require bacon/language-bundle

现在,在AppKernel.php文件中添加以下bundle:

<?php
// app/AppKernel.php
public function registerBundles()
{
    // ...
    new Bacon\Bundle\LanguageBundle\BaconLanguageBundle(),
    // ...
}

配置

在路由配置文件中添加以下行:

bacon_language:
    resource: "@BaconLanguageBundle/Controller/"
    type:     annotation
    prefix:   /{_locale}/admin

渲染语言菜单

{{ bacon_menu_language_render() }}