ViewHelper: translate
TYPO3
Show in appBeschreibung
The f:translate ViewHelper outputs translated strings from XLIFF language files stored in Resources/Private/Language/. Labels can be referenced via a short key, an extension name, a translation domain, or a full LLL:EXT: path. Dynamic values can be injected into labels using placeholders, and a fallback string can be defined for missing keys.
Ziele
- I know that f:translate reads labels from XLIFF files and that the default file location is Resources/Private/Language/locallang.xlf.
- I know the ways to reference a label: a short key, combined with extensionName or a domain, and a full LLL:EXT: path syntax.
- I know how to use the `arguments` argument to inject dynamic values into labels containing %s or indexed placeholders such as %1$s.
- I know how to provide a fallback string via the default argument when a key cannot be found.
- I know how to use inline notation to pass a translated label as an argument to another ViewHelper, for example as the alt attribute of f:image.
- I know that the languageKey argument must be set explicitly when rendering templates in a CLI or FluidEmail context, as no frontend or backend request is available to determine the language automatically.
- I know how to use extensionName or domain alongside key to resolve labels outside of an Extbase context.
Maintainer
Oliver Thiele
Web Development Oliver Thiele