How do you properly set up a select menu so that the dropdown choices can be viewed in a different language when a language pack is installed, but the logic still works? eg: 'Unread','Pending','Ok','Closed' are English.
Code:
'unread' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_realestate_contactor']['unread'],
'inputType' => 'select',
'options' => array('Unread','Pending','Ok','Closed'),
'eval' => array('tl_class'=>'w50'),
'filter' => true,
'sorting' => true,
'save_callback' => array
(
array('tl_realestate_contactor', 'markAsRead')
),
'flag' => 12
),
I use the dropdowns in code, for example
Code:
public function markAsRead($varValue)
{
if($varValue == "Unread")
{
$varValue = "Pending";
}
return $varValue;
}
EDIT: Why the heck does my Code always go spastic when I cut/paste/post it wrapped in the code tags???
Bookmarks