-
Notifications
You must be signed in to change notification settings - Fork 76
Refactoring
kwattro edited this page Apr 17, 2012
·
1 revision
I've created this page to hold discussion key points from the PR #5
- Current version will be marked as 2.0 branch
- A new 2.1 branch will be created to include the refactoring
- master version will currently stay at 2.0 state to not break with users that did not follow PR #5 conversation
- Cookie parameters will be configurable
- Detection mechanism priority configurable
- Allowed_languages
- Behavior for non_allowed_language ( implement a default one, other uses cases can come further )
- Rendering of the locale switch ( implement 2 default use cases
url links
,form
)
- BrowserLocale
- RouterLocale
- CookieLocale
- FallbackLocale
The router, cookie, fallback mechanisms will not require a lot of code but it will make user configurable mechanism if they want to use their own class to override one of the mechanisms.
- Change the _locale in the router if the user switch language
- Change the user _locale
- Provide 2 default implementations ( form or url links )
- Implementations templates need to be overwritable
The cookie set need to be configurable, let's say users may want to set the cookie the first time a _locale is detected. Some other users may want to set the cookie only on user action (locale switch)
Regarding the possibility to use LocaleBundle or \Locale php class. To be continued. Need absolutely to be tested on Windows platform.
LocaleBundle provides a way to update locales from the ICU svn.