Task #49025
Story #42408: Locale Detection / Selection
Dynamic locale detection / determination
Status: | Under Review | Start date: | 2013-06-11 | |
---|---|---|---|---|
Priority: | Could have | Due date: | ||
Assigned To: | Adrian Föder | % Done: | 0% |
|
Category: | I18n | |||
Target version: | TYPO3 Flow Base Distribution - 2.1 | |||
Sprint: | Has patch: | No | ||
PHP Version: | Complexity: |
Description
This provides a way of detecting an appropriate
Locale to use for each request. Shipped with Flow
are two DetectionStrategies, Cookie and HttpAcceptHeader,
which will try to determine a Locale from these sources.
The Cookie's default name is assumed locale
, but
can be set to a different one via Object.yaml.
If a DetectionStrategy can not reliably determine a
Locale, it returns NULL in order to abstain, and the
next Strategy in the configured chain is evaluated.
If eventually none matches, no concrete ``currentLocale``
will be set, hence falling back to the ``defaultLocale``.
Setting a Locale chain would look like::
1 TYPO3:
2 Flow:
3 i18n:
4 detectionChain: ['Cookie', 'AcceptLanguageHeader']
The array values can also be set to a full qualified class name
which must implement \TYPO3\Flow\I18n\Detection\DetectionStrategyInterface.
(from the commit message)
Related issues
History
#1 Updated by Gerrit Code Review about 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21334
#2 Updated by Gerrit Code Review about 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21334
#3 Updated by Gerrit Code Review about 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21334
#4 Updated by Gerrit Code Review about 2 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21334
#5 Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/21334