Cleaned up the translation code
Changed format of changelog to work in plugins page
View Matt Beckett's plugins
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.
It only affects times output by the elgg friendly timei view - I don't know if event calendar is using that or not.
Currently the plugin only outputs time globally - ie. if you set an offset it's the same offset for everyone regardless of location. It's possible to update it to use viewer timezone settings.
For events specifically the best thing to do would be to contact Kevin Jardine and see how much he'd charge to add in user timezone handling.
straight hard code =>
date('j M Y',..)
no settings, nothing;
for events -> it has to be the event's date that (really) matters,
we could do something like (free) timeanddate.com does
in their 'meeting planner' and maybe (at least) display zones
(e.g. from my little js 'world clock';) to let users pick/choose
and coordinate their timezones w.r.t meetings or events ->
20 01 28
Jan 9 2013
21 01 28
Jan 10 2013
12:01 28 DST
Jan 10 2013
1 01 28
Jan 9 2013
17 01 28
Jan 9 2013
19 01 28
Jan 10 2013
2 01 28
Jan 10 2013
2 01 28
Jan 10 2013
6 31 28
Jan 10 2013
9 01 28
Thanks for this very useful mod.
With ref. to this discussion,
I see I can change/translate the name of months but how do I do so for the digits - 0 to 9 ?
For example, 16 -> १६
or 1 -> १
Any translations for 'just now', minutes, hours, 'ago' etc?
Can someone explain in some more details?
You'll have to override the view and translate them there. I don't think people usually think about translating numbers, I sure don't.
If it's a simple 1:1 character replacement (eg. 1 = a, 2 = b, so 12 = ab) you can hook into the views and replace each character after they render. This would be the preferred way so you can target multiple views and not have to be concerned with overrides. I don't know any other languages though so I'm no use to anybody when it comes to the finer details of parsing for programmatic translation. Simple string and character substitution is as much as I can tell you.
Thanks Matt. Thanks again. Yes, simple str replace works fine. I am not sure if it can break anything else or cause any other problem but it does work okay for me.