Jump to:

1160 Posts in 2621 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Problems with HTMLCode in $lang after Update

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 965 Views
  • tekilla83
    Avatar
    Community Member
    20 Posts

    Problems with HTMLCode in $lang after Update Link to this post

    Hi,

    I have in my language file this:

    $lang['de_DE']['Statistik']['ANDERESAISON'] = 'Andere Saison anzeigen  ';

    and then I'm using that:

    $filter = new DropdownField('Saisonauswahl', '', $return, '','' , _t('Statistik.ANDERESAISON','Andere Saison anzeigen  '));

    after update the generated code is like this:

    <fieldset class="top-form">
             <select class=" nolabel" id="CustomSeasonChooseForm__Saisonauswahl" name="Saisonauswahl"><option selected="selected" value="">Andere Saison anzeigen&amp;nbsp;&amp;nbsp;</option><option value="/spielplan-u23/2009/">2009/10</option><option value="/spielplan-u23/2010/">2010/11</option></select>
             <button onclick='changeSeason();return false;'>anzeigen</button>
          </fieldset>

    So it's &amp;nbsp;&amp;nbsp; instead of &nbsp;&nbsp;

    Anyone?

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Problems with HTMLCode in $lang after Update Link to this post

    DropdownField doesn't support filling HTML into <select> boxes (see Convert::raw2xml() call in DropdownField->Field()). This is not an i18n issue - try to output the string directly, it should come out as a HTML entity properly.

    965 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.