---
title: "Feature: #107759 - TranslateViewHelper supports translation domain syntax"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-107759-1729433323"
source: "Changelog/14.0/Feature-107759-TranslateViewHelperSupportsTranslationDomainSyntax.rst"
typo3-version: "14.0"
typo3-major: 14
type: "feature"
issue: 107759
forge: "https://forge.typo3.org/issues/107759"
tags: ["Fluid", "Localization", "ext:fluid"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Feature: #107759 - TranslateViewHelper supports translation domain syntax {#feature-107759-1729433323}

See [forge#107759](https://forge.typo3.org/issues/107759)

## Description {#description}

The Fluid `<f:translate>` ViewHelper now supports the new
[translation domain syntax](https://docs.typo3.org/permalink/changelog:feature-93334-translation-domain-format),
providing a more concise and readable way to reference translation labels.

A new `domain` attribute has been added that accepts both traditional
extension names and the new translation domain names.

The ViewHelper now supports multiple ways to specify translations:

1.  **New domain attribute** \- recommended for new code:

    ```html
    <f:translate key="form.legend" domain="my_extension" />
    <f:translate key="form.legend" domain="my_extension.messages" />
    ```
1.  **Inline domain syntax in key** \- shortest form:

    ```html
    <f:translate key="my_extension.messages:form.legend" />
    <f:translate key="LLL:my_extension.messages:form.legend" />
    ```
1.  **Traditional extensionName attribute** \- still supported:

    ```html
    <f:translate key="form.legend" extensionName="MyExtension" />
    <f:translate key="form.legend" extensionName="my_extension" />
    ```
1.  **Full LLL reference** \- classic syntax, still supported:

    ```html
    <f:translate key="LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:form.legend" />
    ```

## Domain attribute priority {#domain-attribute-priority}

When both `domain` and `extensionName` are provided, the
`domain` attribute takes precedence:

```html
<!-- Uses "other_extension.messages" domain, not "MyExtension" -->
<f:translate key="label" domain="other_extension.messages" extensionName="MyExtension" />
```

## Automatic domain detection {#automatic-domain-detection}

If neither `domain` nor `extensionName` are specified, the
ViewHelper attempts to automatically detect the translation domain from the
context:

1.  **Extbase context**: Uses the controller extension name
1.  **Key with domain prefix**: Extracts domain from `key="domain:id"`
1.  **LLL reference**: Parses the extension key from the file path

## Examples {#examples}

### Using domain attribute with full domain name {#using-domain-attribute-with-full-domain-name}

You can specify the exact translation domain including resource names:

```html
<f:translate key="menu.item" domain="backend.toolbar" />
<!-- Resolves to: EXT:backend/Resources/Private/Language/locallang_toolbar.xlf -->
```

### Inline domain syntax in key {#inline-domain-syntax-in-key}

The shortest form combines domain and key directly:

```html
<f:translate key="core.form.tabs:general" />
<!-- Resolves to: EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf -->
```

### With arguments and default values {#with-arguments-and-default-values}

All existing ViewHelper features work with the new syntax:

```html
<f:translate
    key="users"
    domain="backend.messages"
    arguments="{0: count}"
    default="No users found"
/>
```

### Using variables for domain {#using-variables-for-domain}

Dynamic domain selection is supported:

```html
<f:translate key="label.title" domain="{myDomain}" />
```

## Migration from extensionName {#migration-from-extensionname}

Existing code using `extensionName` continues to work without changes.
However, new code should prefer the `domain` attribute combined with
translation domain syntax for better readability.

Before:

```html
<f:translate key="LLL:EXT:my_extension/Resources/Private/Language/locallang_form.xlf:legend" />
<f:translate key="legend" extensionName="MyExtension" />
```

After:

```html
<f:translate key="my_extension.form:legend" />
<f:translate key="legend" domain="my_extension.form" />
```

## Impact {#impact}

The `<f:translate>` ViewHelper now provides a more convenient and
readable way to reference translations using the new translation domain
syntax. This reduces verbosity in Fluid templates and aligns with modern
translation system conventions used in Symfony and other frameworks.

All existing syntax forms remain fully supported, ensuring backward
compatibility. The new syntax can be adopted incrementally within a project,
and both old and new forms can coexist in the same template.
