szSelectCulturePlugin - 0.1.0

szSelectCulture es un plugin que incluye un filtro y varios metodos para gestionar los idiomas y la cultura en una pagina web, lo diferencia de otros en la posibilidad de utilizar una base de datos para gestionar las culturas de la web y la de mostrar los nombres de los idiomas en los metodos de seleccion cada uno en su propio idioma

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source | Show as Markdown


szSelectCulturePlugin class provides filters and methods for maintaining url with language/culture and change it maintainig old url and component for (form select or link style selection of new language/culture)


Install the plugin:

$ symfony plugin:install szSelectCulturePlugin

Or download it and unzip in your /plugins directory

Clear you cache:

$ symfony cc

Active module in your app/[application]/config/settings.yml

enabled_modules: szSelectCulture

Change your filters in app/[application]/config/filters.yml

rendering: ~

security: ~


class: szSelectCultureFilter

cache: ~

common: ~

execution: ~

Add a route named changeculture in app/[application]/config/routing.yml


url: /:sf_culture/changeculture params: { module: szSelectCulture, action: index }

and add a route named localized_homepage in app/[application]/config/routing.yml


url: /:sf_culture/ param: { module: esms_home, action: index } requirements: { sf_culture: '[a-z]{2}(_[A-Z]{2})?' }


You just need to add one of the following lines of code in your template where you want to insert the select culture methods


<?php include_component('szSelectCulture', 'select') ?>



<?php include_component('szSelectCulture', 'links) ?>


If you prefer any other style, create a new directory called


and other


in templates directoy create a _select.php or _links.php file to overwrite the default layout for these methods.