---
title: "cb:languagePath"
manual: "Content Blocks"
version: "main"
permalink: "https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:content-blocks-view-helper-language-path@main"
source: "Templating/ViewHelpers/LanguagePath/Index.rst"
rendered: "2026-09-22T14:15:39+00:00"
---

# cb:languagePath {#content-blocks-view-helper-language-path}

-   Class: `\TYPO3\CMS\ContentBlocks\ViewHelpers\LanguagePathViewHelper`

Resolves the `LLL:` path to the `labels.xlf` language file of a
Content Block. Use it together with `f:translate` to build a full
translation key without having to hardcode the extension path.

> [!WARNING]
> This ViewHelper only works inside the template of a Content Block. It
> resolves the current Content Block via the `data._name` or
> `settings._content_block_name` template variable. If neither
> variable is available and `name` is not given explicitly, an
> exception is thrown. An exception is also thrown if the resolved
> Content Block is not registered.

## Arguments {#arguments}

-   **name**

    -   *Type:* string

    The vendor/package name of the Content Block (`vendor/name`). If not
    set, the current Content Block is resolved automatically.

## Examples {#examples}

### Default usage {#default-usage}

Inside the current Content Block's own template, `name` can be omitted.

```html
<f:translate key="{cb:languagePath()}:header"/>
```

### Explicit Content Block name {#explicit-content-block-name}

```html
<f:translate key="{cb:languagePath(name: 'vendor/name')}:header"/>
```

## See also {#see-also}

-   [LanguagePath ViewHelper](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:language-path-view-helper@main)
-   [Language definition](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:cb-definition-language@main)
