[TYPO3-templavoila] Multilingual FCE select list in Frontend

David Lanier mailinglists at davidlanier.com
Fri Mar 16 05:39:15 CET 2007


Greetings everyone,

I have an FCE with a select list.  I am able to use use labels in the 
backend using a locallang file [listing 1].

This works fine in the backend.  The labels of the select list are 
pulled from the locallang file.

But I'm stuck in displaying the correct value to the frontend.  The 
number (0, 1 or 2) is stored in the database, so the appropriate label 
for that stored value must be displayed.  I'm sure there must be a 
standard way of doing this, but I haven't been able to find it.

Possibly use stdWrap inside the proc tag? [listing 2]

I would be most grateful if someone could point me in the right direction.

Sincerely,
David Lanier


[listing 1]

<TCEforms type="array">
<config type="array">
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
  <numIndex index="0">LLL:fileadmin/my_locallang.xml:status.0</numIndex>
  <numIndex index="1">0</numIndex>
</numIndex>
<numIndex index="1" type="array">
  <numIndex index="0">LLL:fileadmin/my_locallang.xml:status.1</numIndex>
  <numIndex index="1">1</numIndex>
</numIndex>
<numIndex index="2" type="array">
  <numIndex index="0">LLL:fileadmin/my_locallang.xml:status.2</numIndex>
  <numIndex index="1">2</numIndex>
</numIndex>
</items>
<default>0</default>
</config>
<label>Membership Status</label>
</TCEforms>


[listing 2]
<tx_templavoila type="array">
<title>Membership Status</title>
<eType>select</eType>
<proc type="array">
  <stdWrap>
  <!-- convert integer to LLL value (from my_locallang.xml) -->
  </stdWrap>
</proc>
</tx_templavoila>


More information about the TYPO3-project-templavoila mailing list