3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 867 Views |
-
LastEdited.Ago

14 August 2009 at 5:27am
Hello,
I'm trying to start using SilverStripe. I used $LastEdited.Ago in my template. The page is in Czech, but this shows the time always in English. The translation file (sapphire/lang/cs_CZ.php) contains correct translation of the message. So how do I tell SilverStripe to use it?Regards,
Michal -
Re: LastEdited.Ago

14 August 2009 at 8:40am
I found out hack around this:
1] created this function in my page class:function setLocale() {
i18n::set_locale(Translatable::get_current_locale());
}
and then put $setLocale on the start of my page template and it looks working.However I'm still interested what's the correct way of doing this.
-
Re: LastEdited.Ago

15 August 2009 at 5:16am
There is bug in the hack: do not call the method setLocale or bad things will happen!
| 867 Views | ||
|
Page:
1
|
Go to Top |

