Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar change language

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1404 Views
  • Suzanne
    Avatar
    Community Member
    37 Posts

    Event Calendar change language Link to this post

    Hi,

    I use the even calendar module. But I can't change the months into Dutch language. Tried several things.
    Does enyone know where I can change this or how? The same is with the today, this week etc.

    Gr. Suzanne

    I attached a screen so you can see what I mean.

    Attached Files
  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar change language Link to this post

    The month names are generated by the strftime() function in PHP, so make sure you have set the correct locale using setlocale().

    http://php.net/strftime
    http://php.net/setlocale

  • Suzanne
    Avatar
    Community Member
    37 Posts

    Re: Event Calendar change language Link to this post

    Hi,

    I tried but it didn't work. But I'm probably doing something wrong, so in which php should I set the:

    setlocale(LC_ALL, 'nl_NL');

    Suzanne

  • Suzanne
    Avatar
    Community Member
    37 Posts

    Re: Event Calendar change language Link to this post

    Hi,

    Does enybody know where I put the

    setlocale(LC_ALL, 'nl_NL');

    ?

    Gr. Suzanne

  • Jurgen Jessurun
    Avatar
    Community Member
    9 Posts

    Re: Event Calendar change language Link to this post

    Hi Suzanne,

    You can add setlocale(LC_ALL, 'nl_NL'); in your mysite/_config.php file.

  • Suzanne
    Avatar
    Community Member
    37 Posts

    Re: Event Calendar change language Link to this post

    Hoi,

    I tried but it didn't work

    See my config file.

    Gr. Suzanne

    Attached Files
  • mahir
    Avatar
    Community Member
    11 Posts

    Re: Event Calendar change language Link to this post

    I guess there is something missing with SS3 regarding the lang folder processing of new modules.
    I have installed two modules providing my own language is in the tr.yml file,
    but couldn't display it in Turkish no matter what. I even changed the contents in en.yml file, still no luck to view it in my language.
    As if it doesnt get the content from .yml files.

  • Suzanne
    Avatar
    Community Member
    37 Posts

    Re: Event Calendar change language Link to this post

    Hi everyone,

    Still not working I tried several things

    mysite/_config.php

    i18n::set_locale('nl_NL');
    $field = new DateField();
    i18n::set_date_format('dd.MM.YYYY');

    event_calander/_config.php
    i18n::set_locale('nl_NL');
    $field = new DateField();
    i18n::set_date_format('dd.MM.YYYY');

    I even added an nl.yml to the lang map of the event_calendar

    Please help

    Suzanne

    1404 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.