Skip to content

Instantly share code, notes, and snippets.

@chriwo
Created December 21, 2016 07:23
Show Gist options
  • Save chriwo/f19937b9d2355a43107270ad6954483a to your computer and use it in GitHub Desktop.
Save chriwo/f19937b9d2355a43107270ad6954483a to your computer and use it in GitHub Desktop.
TCA SelectBox Value and output in FE with language file
...
<!--
jobTitle is the object property and equal with the TCA definition job_title
-->
<f:translate key="jobtitle.{jobItem.jobTitle}"/>
...
...
<trans-unit id="jobtitle.1">
<source>Job 1</source>
</trans-unit>
<trans-unit id="jobtitle.2">
<source>Job 2</source>
</trans-unit>
<trans-unit id="jobtitle.3">
<source>Job 3</source>
</trans-unit>
...
...
'type' => 'select',
// next line if you unsing TYPO3 7.6 and above
'renderType' => 'selectSingle',
'items' => [
['LLL:EXT:extKey/Path/locallang.xlf:jobtitle.1', 1],
['LLL:EXT:extKey/Path/locallang.xlf:jobtitle.2', 2],
['LLL:EXT:extKey/Path/locallang.xlf:jobtitle.3', 3],
]
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment