Jump to:

23378 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Login page => $Translations is empty

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 305 Views
  • Josua
    Avatar
    Community Member
    86 Posts

    Login page => $Translations is empty Link to this post

    Hi all!

    When I show the login page, the $Translations placeholder is empty.

    <% if Translations %>
    <% control Translations %>
    <li><a href="$Link" hreflang="$Locale.RFC1766" title="$Title - $Locale.Nice">
    <img src="$ThemeDir/images/flags/lang-<% sprintf(_t('IMAGE','%2.2s'),$Locale.RFC1766) %>.gif"></a>
    </li>
    <% end_control %>
    <li><a href="$Link" hreflang="$Locale.RFC1766" title="$Title - $Locale.Nice">
    <img src="$ThemeDir/images/flags/lang-<% sprintf(_t('IMAGE','%2.2s'),$Locale.RFC1766) %>.gif"></a>
    <span>$Locale.NiceShort</span>
    </li>
    <% end_if %>

    How I can display for the login page the other languages for select them?

    Thanks,

    Regards,
    Jose

  • swaiba
    Avatar
    Forum Moderator
    1785 Posts

    Re: Login page => $Translations is empty Link to this post

    Hi,

    It doesn't work the same way as other pages - it does use languagestrings so it matches the current locale of the system.

    $lang['es_ES']['Security']['PASSWORDSENTTEXT'] = 'Gracias! El enlace para restaurar su contraseña ha sido enviado a \'%s\'.';

  • Josua
    Avatar
    Community Member
    86 Posts

    Re: Login page => $Translations is empty Link to this post

    Hi swaiba!!

    Yes, that's clear, but then, how can I put some little flags of the supported languages?
    The standard system ($Translations) does not work for this type of pages.
    I have to do somenthing special for these pages, right?

    Thanks,
    Regards,
    Jose

    305 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.