[Typo3-dev] PHP syntax
Søren Vedel
sv at workhouse.dk
Sun Sep 4 15:59:51 CEST 2005
Kraft Bernhard wrote:
> don't hurt a PHP programmer ! mentally :)
I know it hurts to meet a newbee, but you seems to be patient ;-)
> What most probably your problem is:
> > Now I want to assign the correct values to display in FE and not the
> numbers 0 and 1.
Exactly!
In pi1/locallang.php I have this:
$LOCAL_LANG = Array (
"default" => Array (
"listFieldHeader_type" => "Type",
"listFieldHeader_city" => "City",
...
In locallang_db.php I have this:
$LOCAL_LANG = Array (
"default" => Array (
"tx_telexadresses_filiaisfranquias" => "Filiais and Franquias",
"tx_telexadresses_filiaisfranquias.type.I.0" => "Filiais",
"tx_telexadresses_filiaisfranquias.type.I.1" => "Franquias",
"tx_telexadresses_filiaisfranquias.type" => "Type",
...
> you should retrieve those values by using $this->pi_getLL('label_1') or
> label_2 label_3 ...
>
> the keys 'label_1' must get defined in the pi1/locallang.php file ...
>
> so your extension also supports multiple languages ...
I know!
I want to retrieve:
"tx_telexadresses_filiaisfranquias.type.I.0" => "Filiais",
when type is "0" and,
"tx_telexadresses_filiaisfranquias.type.I.1" => "Franquias",
when type is "1".
When I output this in singleview:
<tr>
<td nowrap valign="top"'.$this->pi_classParam("singleView-HCell").'>
<p>'.$this->getFieldHeader("type").'</p>
</td>
<td valign="top">
<p>'.$this->getFieldContent("type").'</p>
</td>
</tr>
I only get the "0" or the "1", but i need of course the "Filiais" and
the "Franquias".
I can't figure out how to use your suggestion?
$this->pi_getLL('label_1')
Like this $this->pi_getLL('type.I')?
- Søren
More information about the TYPO3-dev
mailing list