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

Problems with Silverstripe $Created.Ago – norwegian locale


Go to End


1465 Views

Avatar
Thomashv

Community Member, 35 Posts

15 November 2010 at 5:16am

When using norwegian locale nb_NO, the $Created.Ago functionality did not output right format.
I found the problem in the norwegian language file nb_NO.php in the lang folder under sapphire.
This two lines seems to be wrong:
$lang['nb_NO']['Date']['TIMEDIFFAGO'] = '%er siden';
$lang['nb_NO']['Date']['TIMEDIFFAWAY'] = '%er til';

So I changed it to:
$lang['nb_NO']['Date']['TIMEDIFFAGO'] = '%s siden';
$lang['nb_NO']['Date']['TIMEDIFFAWAY'] = '%s til';

And no it works as it should.
I've had this problem with SS version 2.3.3, 2.4.0 and 2.4.2. Truly it is a problem in all versions.

Actually I have no questions, just wanted to share this with other norwegian developers if they experience the same problems.
This probably qualify to open a ticket, but I'm not sure about how that's done...? (Well, that's a question) :)