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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Login page => $Translations is empty


Go to End


3 Posts   649 Views

Avatar
Josua

Community Member, 87 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, 1899 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, 87 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