Hi
I have a problem with translating date display, from English into Danish. The month is not translated in the Danish date display. Does anyone know how it can be done.
In the language file there is a translation of months with 'date: month: 01' => 'January% s', etc., but the translation is not used in the general date display.
English
Danish
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
@Alexander thanks, he_IL in setdates.php does show correct text.
I tried to replace the acronym line in friendlytime.php to the line you suggest above, but got a blank page -
bad php code ;- ) send all code... maybe can correct it.
I was wrong - eliminating htmlentities solve my pronlem with russian UTF8 titles.
Example here (last string is link with title acronym), dirty code of this page
Alexander
I see your example is working. Do you also have it working on an elgg site with both english and russian language options?
Alexander getting rid of htmlentities solved my problem with Hebrew UTF-8 also - many thanks
I'm a bit lost here, doesn't work for me. Could you explain a little more in details how you did your fix?
@Susan ;-)
Gillie, not sure if it would work for you, at moment I'm not worrying myself about multiple languages. Anyhow in my language file I put:
'friendlytime:date_format' => '%A, %d %B %Y'
then in views/default/output/friendlytime.php
setlocale(LC_ALL, 'he_IL.utf-8');
$timestamp = (strftime(elgg_echo('friendlytime:date_format'), $vars['time']));
Okay thank you. I had that working to only lang switch doesn't work.
I even didn't tried on Elgg site, just tested pure-PHP solution,applicable for any non-7bit languages (I hope)
But Cash already wrote giudeline for your case:
- Previous
- 1
- 2
- 3
- 4
- Next
You must log in to post replies.