cb:languagePath 

  • 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.

Arguments 

Name Type Default Required
string
name
Type
string

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

Examples 

Default usage 

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

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

Explicit Content Block name 

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

See also