WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Date format (12 posts)

  1. fesslaeda
    Member
    Posted 3 months ago #

    Hello!
    Have a question. How is localization for month names? In Russian language when writing the name of the month in full, the ending is not inclined, this is not right.

    https://wordpress.org/plugins/events-manager/

  2. caimin_nwl
    NetWebLogic Support
    Posted 3 months ago #

    Hi,

    Are you saying the Russian translation of month names isn't correct? If so, that could be because currently the Russian translation of Events Manager is only 86% complete.

    If you have time to add the correct translations that would be much appreciated and helpful to other Russian users:
    http://translate.netweblogic.com/projects/events-manager/

  3. fesslaeda
    Member
    Posted 3 months ago #

    This is how I understand the translation of the administrative part. And I'm talking about the fact that in Russian the end of the month name varies depending on how wrote date. for example, on 2 апереля, instead of 2 аперль - pay attention to the last letter.

  4. fesslaeda
    Member
    Posted 3 months ago #

    Where the plugin takes the name of the month?

  5. caimin_nwl
    NetWebLogic Support
    Posted 3 months ago #

    I see the difference in the two date examples but I'm not clear on where you're seeing this. Is it in WordPress admin or the front-end?

  6. fesslaeda
    Member
    Posted 3 months ago #

    This front-end in widgets and on the event page

  7. philipjohn
    Member
    Posted 3 months ago #

    Which widgets exactly?

    Are you able to give us a link where we can see this please, or screenshots?

    Thanks

  8. fesslaeda
    Member
    Posted 3 months ago #

    http://cs539218.vk.me/u3435411/docs/179369a6ced9/Test_-_Eschyo_odin_sayt_na_WordPress_-_2014-04-03.png?extra=otrZFHMk193kmjQHTG9O5N2T-XbY_Jjnzny6Glgt6UzdCjaCzF6vkhM9IdjrOPMRbKr1iyiLVFCbvOI56vXtq8-mCWeh
    Here's a screenshot of it on a date 19 Март 2014 - 10 Апрель 2014, and should be 19 Марта 2014 - 10 Апреля 2014

  9. fesslaeda
    Member
    Posted 3 months ago #

    in the standard output the date in wordpress problem declination dates can be solved by adding this code in function.php template

    function the_russian_time($tdate = '') {
         if ( substr_count($tdate , '---') > 0 ) return str_replace('---', '', $tdate);
    
         $treplace = array (
         "Январь " => "Января ",
         "Февраль " => "Февраля ",
         "Март " => "Марта ",
         'Апрель ' => 'Апреля ',
         "Май " => "Мая ",
         "Июнь " => "Июня ",
         "Июль " => "Июля ",
         "Август " => "Августа ",
         "Сентябрь " => "Сентября ",
         "Октябрь " => "Октября ",
         "Ноябрь " => "Ноября ",
         "Декабрь " => "Декабря ",
    
         "January" => "Января",
         "February" => "Февраля",
         "March" => "Марта",
         "April" => "Апреля",
         "May" => "Мая",
         "June" => "Июня",
         "July" => "Июля",
         "August" => "Августа",
         "September" => "Сентября",
         "October" => "Октября",
         "November" => "Ноября",
         "December" => "Декабря",     
    
         "Sunday" => "воскресенье",
         "Monday" => "понедельник",
         "Tuesday" => "вторник",
         "Wednesday" => "среда",
         "Thursday" => "четверг",
         "Friday" => "пятница",
         "Saturday" => "суббота",
    
         "Sun" => "воскресенье",
         "Mon" => "понедельник",
         "Tue" => "вторник",
         "Wed" => "среда",
         "Thu" => "четверг",
         "Fri" => "пятница",
         "Sat" => "суббота",
    
         "th" => "",
         "st" => "",
         "nd" => "",
         "rd" => ""
    
         );
            return strtr($tdate, $treplace);
    }
    add_filter('date', 'the_russian_time');
    add_filter('the_time', 'the_russian_time');
    add_filter('get_the_time', 'the_russian_time');
    add_filter('the_date', 'the_russian_time');
    add_filter('get_the_date', 'the_russian_time');
    add_filter('the_modified_time', 'the_russian_time');
    add_filter('get_the_modified_date', 'the_russian_time');
    add_filter('get_post_time', 'the_russian_time');
    add_filter('get_comment_date', 'the_russian_time');
  10. fesslaeda
    Member
    Posted 2 months ago #

    Hello!
    Tried to change the name of the months in the file jquery.ui.datepicker-ru.js but nothing happens. The month name still does not display correctly. I ask you to specify where the plugin takes the names of months?

  11. fesslaeda
    Member
    Posted 2 months ago #

    Or please tell me on what function (with which the date is displayed) hang filter add_filter ()

  12. angelo
    NetWebLogic Support
    Posted 2 months ago #

    sorry for the confusion but is this the translation of month in EM like calendar, placeholders or datepicker ?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.