[TYPO3-core] RFC: enable localization for section titles (bugfix)

Bernhard Kraft kraftb at kraftb.at
Wed Jul 12 13:53:53 CEST 2006

Hash: SHA1

Dmitry Dulepov wrote:
> Hi!
> This is a SVN patch request.
> Type: bug (http://bugs.typo3.org/view.php?id=3594)
> Branches: HEAD & TYPO3_4-0

>  								$opt=array();
>  								$opt[]='<option value=""></option>';
>  								foreach($value['el'] as $kk => $vv)	{
> -									$opt[]='<option value="'.$kk.'">'.htmlspecialchars('NEW "'.$value['el'][$kk]['tx_templavoila']['title'].'"').'</option>';
> +									$opt[]='<option value="'.$kk.'">'.htmlspecialchars('NEW "'.$this->sL($value['el'][$kk]['tx_templavoila']['title']).'"').'</option>';
>  								}
>  								$rowCells['formEl']='<select name="flexFormsCmdData'.$formPrefix.'['.$key.'][value]">'.implode('',$opt).'</select>';

Or even better: Let also the "NEW" come from an LL file:


I already suggested this in February but didn't have any further time to care about
it and there wasn't much response except from Martin and Franz.

And it is interesting that Martin had the same question (What does this tx_templavoila there)
months again and now :)

Dmitry: Are you sure that when ->sL('Here whatever Text') get's called the same text as passed is
returned when no label is found for it ?
As far as i can extract from typo3/sysext/lang/lang.php line 300:
- ----
    if (strcmp(substr($input,0,4),'LLL:'))  { // Using obsolete 'language-splitted' labels:
      $t = explode('|',$input);
      $out = $t[$this->langSplitIndex] ? $t[$this->langSplitIndex] : $t[0];
      return $this->hscAndCharConv($out, $hsc);
- ----
it is doing the "obsolete" language splitting when no "LLL:" label is found.

this would mean you break all labels of sections for different languages then the default one for
old flexforms which do not use "LLL:" labels for the section title (downwards compatibility).

But I may be wrong :)

Have a look at the above link. I did a ?: operation to surely return a value and tended to not use
but rather

This is a new option - LLL labels for flexform sections. So we can choose a new place where it
has to get added and simply let it overrule the previous way of setting [title].

We should even consider Masis suggestion and move it out of this "tx_templavoila" sub-structure -
I think this was for historic reasons when flex-forms and TV was one and the same thing - which
is not true anymore - FxF (as I would abbreviate FlexForm :) are part of the core.

- --
- ----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
- ----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the TYPO3-team-core mailing list