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.

Dates translation

January 14, 2011 8:32am

Subscribe [6]
  • #1 / Jan 14, 2011 8:32am

    Visualis

    23 posts

    Hi there,

    In my sites news archive, I need both my entry_date and my month_links to display in Norwegian.

    I have included this in my document header:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//NO-nb" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html >

    And I have tried using the Translation Utility and translated the months inside the core_lang.php file.

    What is the clue here, to get the dates (months) on my site in my own language?

    Thanks in advance

  • #2 / Jan 14, 2011 4:32pm

    Sue Crocker

    26054 posts

    Hi, Visualis.

    Can you tell us which version/build of EE2.x you’re using? See EEWiki:// HowTo Determine My EE Version

    There are two places in there to set the value of months. Did you change the three letter version and the full version of the month names?

  • #3 / Jan 15, 2011 7:27pm

    Visualis

    23 posts

    Hi

    Yes, changed both the thee letter version and the full version of the month names.

    EE v2.1.0, build: 20100810

  • #4 / Jan 16, 2011 4:13pm

    Greg Salt

    3988 posts

    Hi Visualis,

    Please do upgrade when possible. The latest version is 2.1.3. Which tags are generating the variables that are incorrect? Can you post a snippet of your code and let us know the expected output?

    Cheers

    Greg

  • #5 / Jan 16, 2011 4:41pm

    Visualis

    23 posts

    Hi Greg,

    I’ll update sometime soon.

    This code:

    {exp:channel:entries channel="news" status="open"} 
    {title}
    {entry_date format="%l %j. %F %Y"} 
    {/exp:channel:entries}

    Generates:
    My Title
    Wednesday 1. December 2010

    Which I would like to be in Norwegian:
    My Title
    Onsdag 1. desember 2010

    As mentioned earlier, I have tried using the Translation Utility and translated the months and weekdays inside the core_lang.php file.
    Not sure what else to change.

  • #6 / Jan 17, 2011 3:40am

    John Henry Donovan

    12339 posts

    Visualis,

    Using the translation Utility you are translating text for the Control Panel and not the front-end.

    Take a look at the Date/Time Language Converter add-on

  • #7 / Jan 20, 2011 7:20am

    Visualis

    23 posts

    Hi John

    I’ve tried the Date/Time Language Converter that you suggest. Still no luck.

    This:

    {exp:datetime_convert language="es_ES" format="%A %e %B %Y"}{entry_date}{/exp:datetime_convert}

    Outputs:
    Wednesday 1 December 2010

    English, eventhough I set it to Spanish.
    Maybe this has something to do with my server.

  • #8 / Jan 20, 2011 3:54pm

    Ingmar

    29245 posts

    I’d suggest to create and use a language pack, or modify the default English one. In 2.1.3, that would be .../system/expressionengine/language/english/core_lang.php.

  • #9 / Jan 21, 2011 4:31am

    Visualis

    23 posts

    Actually i worked, Ingmar, modifying the default English .../system/expressionengine/language/english/core_lang.php
    I uploaded the modified core_lang.php via ftp.

    Thought that was kind of what I did when i used the Translation Utility to modify core_lang.php as described in my first post.

    Anyway: It works now!
    Thanks!

  • #10 / Jan 21, 2011 3:56pm

    Sue Crocker

    26054 posts

    Glad Ingmar was able to help. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases