Jump to:

10381 Posts in 2195 Topics by 1711 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar: New Feature

Discuss all other Modules here.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 2375 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar: New Feature Link to this post

    The day names are translated like this:

          return strftime('%a',$timestamp);

    So make sure your PHP locale is set correctly.

  • karibe
    Avatar
    Community Member
    56 Posts

    Re: Event Calendar: New Feature Link to this post

    Yeah!
    Works after setting it up like this:

          if($this->dataRecord->hasExtension('Translatable'))
          {
             if ( ereg("^".Translatable::default_lang(), $_SERVER['HTTP_ACCEPT_LANGUAGE']) )
             {
                i18n::set_locale(Translatable::default_locale());
                setlocale(LC_ALL, Translatable::default_locale().'.utf8');
             }
             else
             {
                Translatable::set_current_locale("en_US");
                i18n::set_locale("en_US");
                setlocale(LC_ALL, "en_US.utf8");
             }
          }

    How to translate 'Start' and 'End' words in $CalendarFilterForm?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar: New Feature Link to this post

    You can use CalendarFilterFieldSet.START and CalendarFilterFieldSet.END. Glad it's working!

  • karibe
    Avatar
    Community Member
    56 Posts

    Re: Event Calendar: New Feature Link to this post

    Mission accomplished:) Thanks UncleCheese for Your great help!

    2375 Views
Page: 1 2 3
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.