ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Forum Localisation

November 18, 2008 4:43pm

Subscribe [3]
  • #1 / Nov 18, 2008 4:43pm

    Jedidiah

    24 posts

    I get the feeling I’m just missing a setting somewhere, but I haven’t found it yet.

    I’m trying to get the forum to display dates in the correct order;  dd/mm rather than mm/dd

    I have the Default Time Formatting in System preferences and the localisation settings in the forum preferences set to European

    ...but in the member list and latest post info it is still Americanised.

    Any pointers?

  • #2 / Nov 18, 2008 7:22pm

    Erdal Demirtas

    84 posts

    Hi,
    in another thread Derek said “you can do this without changing a single line of source code”.

    I think he means without changing the core.

    To do what you want I have changed some code in theme files.

    Example:

    /themes/forum_themes/developer/theme_index.php

    {last_post format="%m-%d-%Y %h:%i %A"}

    I changed this to

    {last_post format="%d-%m-%Y %H:%i"}

    There are a few other format parameters in other files.
    You can do a text file search to find them.

    It would be better to have a variable in the language files for such parameters which need to be i18n. I think I will write a feature request for this.

    This is the way I go.

    I hope this helps you.

  • #3 / Nov 18, 2008 7:41pm

    Jedidiah

    24 posts

    I had thought about changing it in the template files, but I thought there must be a better way of changing it in the settings. What does choosing European in the preferences actually change then?

    So I suppose that also means there is no way of allowing forum users to select their own date formatting relevant to their country.

    Thanks for the help Erdal, and for pointing to that thread.

  • #4 / Nov 19, 2008 3:07am

    Ingmar

    29245 posts

    The changes are for the control panel, not (yet) the forum. In this case, Erdal is correct, modifying the themes is the way to go. And yes, this would certainly make for a very good feature request.

  • #5 / Nov 19, 2008 7:38am

    Erdal Demirtas

    84 posts

    Ingmar, thank you for the clarification.

    Jedidiah,

    if you search the format parameters do not forget to search also:

    "%F %d, %Y  %h:%i %A"

    I think using “nbsp” is realy not a very good of layouting in this case, but it is there.
    So such parameters should be changed too.

    I think searching just

    %A

    shows all the relevant places for modification.

  • #6 / Nov 19, 2008 8:22am

    Jedidiah

    24 posts

    Thanks Ingmar and Erdal,

    That’s a time saver searching for %A

    Doesn’t catch the dates on the member profiles though they don’t have the format attribute, just

    {recent_forum_post_date}

    and

    {last_visit_date}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases