Task #49025

TYPO3 Flow Base Distribution - Story #42408: Locale Detection / Selection

Dynamic locale detection / determination

Added by Adrian Föder about 8 years ago. Updated over 7 years ago.

Status:
Under Review
Priority:
Could have
Assignee:
Category:
I18n
Start date:
2013-06-11
Due date:
% Done:

0%

Estimated time:
Sprint:
PHP Version:
Has patch:
No
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::

    TYPO3:
      Flow:
        i18n:
          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

Is duplicate of TYPO3.Flow - Feature #35030: Dynamic locale detectionUnder ReviewKarsten Dambekalns2012-03-20

Actions

Also available in: Atom PDF