Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

Login page => $Translations is empty


Reply


3 Posts   348 Views

Avatar
Josua

Community Member, 86 Posts

6 March 2012 at 10:16am

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

Avatar
swaiba

Forum Moderator, 1799 Posts

7 March 2012 at 3:34am

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\'.';

Avatar
Josua

Community Member, 86 Posts

7 March 2012 at 6:33am

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