Localization in Extbase
Warning
The information on this page might be outdated!
Localization of Extbase models
Identifiers in localized models
Domain models have a main identifier
uid
and an additional property
_localized.
Depending on whether the overlay type
language aspect is enabled (
Language or
Language) or disabled (
Language),
the identifier contains different values.
When the overlay language aspect is enabled, then the
uid
property contains the
uid
value of the default language record and
the
uid
of the translated record is kept in the
_localized.
| Context | Record in language 0 | Translated record |
|---|---|---|
| Database | uid:2 | uid:11, l10n_parent:2 |
| Domain object values with Overlay language aspect enabled | uid:2, _localizedUid:2 | uid:2, _localizedUid:11 |
| Domain object values with Overlay language aspect disabled | uid:2, _localizedUid:2 | uid:11, _localizedUid:11 |
Hint
If your project uses
typo3/cms-workspaces
there is yet another
additional property,
_versioned. Refer to the
Workspaces documentation for details on
workspace overlays.
Translating labels
This chapter covers how Extbase handles records across languages. Translating the labels of an extension — button captions, flash messages, validation errors — is a separate topic:
See also
- Translating labels in Extbase — in controllers and other PHP code
- LocalizationUtility API reference
— all parameters of
translate() - Translating labels in Fluid —
the
<f:ViewHelpertranslate>