baconmanager/language-bundle

This bundle of symfony2

Installs: 506

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Open Issues: 0

Type:symfony-bundle

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

This package is not auto-updated.

Last update: 2024-03-16 15:30:42 UTC


README

Codacy Badge Latest Stable Version License SensioLabsInsight

Este bundle é responsável por adicionar gerenciar os idiomas do Manager, nele esta o crud completo e mais a rota para alterar o idioma e voltar para a pagina que estava.

Instalação

Para instalar o bundle basta rodar o seguinte comando abaixo:

$ composer require bacon/language-bundle

Agora adicione os seguintes bundles no arquivo AppKernel.php:

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

Configuração

Adicionar as seguintes linhas no arquivo de configuração de rotas

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

Renderizando o menu de idiomas

{{ bacon_menu_language_render() }}