Hippo DateTime allows you to input a datetime (unixtime) and then get that value returned in potentially limitless languages based on the system locales installed on your web server.
Allows you to output a date in any language based on your system locale.
Hippo DateTime allows you to input a datetime (unixtime) and then get that value returned in potentially limitless languages based on the system locales installed on your web server.
Copy the ‘hippo_datetime’ folder into ./system/user/addons/
folder.
{exp:hippo_datetime:convert}
A single tag which converts the date/time to the chosen locale.
Options | Description |
---|---|
datetime="" |
The input date/time which must be formatted in unixtime/epoch |
format="" |
Specifies the output format of the date/time that you want based on PHP’s strftime formatting options. |
locale="" |
Tells the add-on what locale to use, based on the installed locales |
tz_localize="" |
Specifies the full localization for timezone offsets and will output the relative time in that chosen timezone |
{exp:hippo_datetime:relative}
A single tag which will output the date/time in a human readable format, for example “5 minutes ago” but in the supplied locale/language.
Options | Description |
---|---|
datetime="" |
The input date/time which must be formatted in unixtime/epoch |
locale="" |
Tells the add-on what locale to use, based on the installed locales |
tz_localize="" |
Specifies the full localization for timezone offsets and will output the relative time in that chosen timezone |
{exp:hipp_datetime:show_locales}
Will output a table to screen to show all the available locales installed on the server (for debugging/testing purposes).
Locale | Timezone | Language |
---|---|---|
fr_FR | Europe/Paris | French |
es_ES | Europe/Madrid | Spanish |
nl_NL | Europe/Amsterdam | Dutch |
de_DE | Europe/Berlin | German |
po_PO | Europe/Lisbon | Portuguese |
zh_CN | Asia/Shanghai | Simplified Chinese |
zh_TW | Asia/Taipei | Traditional Chinese |
In our tests, some locales will not output date/times in their appropriate language. For some languages, there are also multiple choices and it may require trial and error to find the correct locale to output in the language you desire.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.