0

I am using this addon to show time in a "time ago" format. The problem with this one is that it doesn't seem to support multilanguage.

Is there an add-on or a PHP solution that supports this kind of feature?

1

I think, you would like to show the Date (like day, month name) in different languages. Right? If you are using language pack for multi-language then you can change those into language file "system\expressionengine\language\english\core_lang.php". This is for English, you can do same for other language.

1
  • My current path of action is to just add a language folder to the addon and utilize that to translate the output. I just wanted to see some more information on this matter because I might have missed an addon or solution that already exists. Sep 2 '13 at 8:54
0

Time / date values seem to be hardcoded in English in the plugin code.

A few things you can try:

  1. Ping the dev on github or via email (look at the source code)

  2. As a temporary solution you could use Low Replace (or something similar) to replace some text in English by its equivalent in whatever language you need.

Code:

{exp:low_replace find="on|1 day ago|([0-9]+) days ago" replace="le|il y a 1 jour|il y a $1 jours" multiple="yes" regex="yes"}
    {exp:nice_time date="{entry_date}" format="%d-%m-%Y"}
{/exp:low_replace}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.