Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » EVENT_CALENDAR

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 1927 Views
  • alina70
    Avatar
    Community Member
    8 Posts

    EVENT_CALENDAR Link to this post

    Hi,
    It's possibile to translate Event_Calendar in italian?
    How can I do?
    Thank you

  • UncleCheese
    Avatar
    4085 Posts

    Re: EVENT_CALENDAR Link to this post

    Sure. Just create an it_IT.php lang file and add all your translations. We could really use more!

  • alina70
    Avatar
    Community Member
    8 Posts

    Re: EVENT_CALENDAR Link to this post

    Thank you UnlceCheese,
    I immagine that I must create the file \lang\it_IT.php with the translation ... but how can I do to set this new file and not the file en_US.php ??
    many thanks
    ale

  • UncleCheese
    Avatar
    4085 Posts

    Re: EVENT_CALENDAR Link to this post

    It should follow your locale settings. You may have to manually set your locale using i18n::set_locale("it_IT"); in your _config.php.

    When you finish the translation, please post here so I can check into the code. Thanks.

  • alina70
    Avatar
    Community Member
    8 Posts

    Re: EVENT_CALENDAR Link to this post

    Hi,
    I have modified it_IT.php from en_EN.php and I have manually set my locale using i18n::set_locale("it_IT"); in \event_calendar\_config.php.... but I noticed that some words like the name of months are always in english ...
    why? In javascript\locale there is date_it.js with the correct names but seems not to consider them ....
    How can I do?
    Many thanks

  • UncleCheese
    Avatar
    4085 Posts

    Re: EVENT_CALENDAR Link to this post

    Yeah, I'm not sure why users are reporting that they need to manually set their locales. Do you have other modules that are translating correctly without that?

    The month names are generated using the PHP strftime() function, which is supposed to be locale-aware. Does strftime() return Italian months for you?

    Make sure sure you update the javascript locale file in your it_IT.php. I think it's the last line. If you tell it to look for a different js file, you should get the translations in your calendar widget.

  • alina70
    Avatar
    Community Member
    8 Posts

    Re: EVENT_CALENDAR Link to this post

    I think I have followed your instructions.
    In it_IT.php file I checked : there's date_it.js .... I think it is correct, right?
    I attach the file where you can see that the month names aren't correct ...

    I know that I'll probably silly questions but I'm new of SS and I'd like to learn because I think it's a is a great software but the web sites must also be in Italian ... so I hope you can help me.

    Many thanks

    Attached Files
  • zueri
    Avatar
    Community Member
    5 Posts

    Re: EVENT_CALENDAR Link to this post

    I had the same problem with the month names. I wanted the German month names, but it always showed the English names. The solution for me was to add the following line to the _config.php in mysite. The setting is for Swiss German.

    setlocale (LC_TIME, "de_CH.UTF-8");

    For Italian it should be:

    setlocale (LC_TIME, "it_IT.UTF-8");

    Maybe this helps.

    1927 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.