Commit Graph

3 Commits

Author SHA1 Message Date
H. Westphal c915f4851f Added another "before" possibility to retrieve the locale from a Twig template. 2011-10-22 11:23:43 +02:00
Fabien Potencier 74bc699b27 moved management of the locale from the Session class to the Request class
The locale management does not require sessions anymore.

In the Symfony2 spirit, the locale should be part of your URLs. If this is the case
(via the special _locale request attribute), Symfony will store it in the request
(getLocale()).

This feature is now also configurable/replaceable at will as everything is now managed
by the new LocaleListener event listener.

How to upgrade:

The default locale configuration has been moved from session to the main configuration:

Before:

framework:
    session:
        default_locale: en

After:

framework:
    default_locale: en

Whenever you want to get the current locale, call getLocale() on the request (was on the
session before).
2011-10-08 18:34:49 +02:00
Fabien Potencier 8b55541aee added an UPGRADE file 2011-10-08 18:29:31 +02:00