Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author ryanfait

    (@ryanfait)

    Yes, I’m working on an update that will support languages in the JavaScript files. It’s a bit complicated, but I should have an update out soon.

    Thread Starter raboodesign

    (@raboodesign)

    Hi Ryan,

    Good to hear! I understand you want to do this yourself, but I have already a hard coded translation and no time to wait. I’ll ask my programmer to fix it.

    However, if you have an update, let me know and I’ll give you a Dutch translated .po/.mo file.
    Thanks for this wonderful and simple plugin. Cheers!

    Plugin Author ryanfait

    (@ryanfait)

    Yes, could you send me the .po/.mo files, please?

    This is my first plugin, so translation is all new to me. I’m 95% done with the next version, just need to test it in a few browsers.

    Thread Starter raboodesign

    (@raboodesign)

    I can do that when the plugin is finished. There is currently no point in creating one because there are quite a few entries in the javascripts which cannot be imported into a pot file.
    For the time being, I hardcoded the translation in the files themselves, you see.

    Plugin Author ryanfait

    (@ryanfait)

    https://devcal.ryanfait.com
    https://devcal.ryanfait.com/wp-content/plugins/event-list-calendar/assets/js/ajax.js

    I have to manually add each language in the JS file, but it detects what language the WP installation is (the today.js file no longer contains month names). Shoot me an email on ryanfait.com/contact and I’ll send you the files if you want to take a look.

    Hi, there is another problem. Translate the date inside single event page. But I have the solution, use the wordpress function “date_i18n” instead of php function “date”.

    event-list-cal.php:

    function event_list_cal_above_content($content) {
    	if ( is_singular( 'event-list-cal' ) ) {
    		$post_custom = get_post_custom();
    		$date_format = get_option( 'event_list_cal_single_date_format', get_option( 'date_format' ) );
    		foreach($post_custom as $key => $value) {
    			if($key == 'event-date') {
    				$date = strtotime($value[0]);
    				//$event_date = date($date_format, $date);
    				$event_date = date_i18n($date_format,$date);
    			}
    BraMax

    (@bramaxgmailcom)

    Hello! I’m having the same problem, only the current month in untranslatable. I’m using the ajax.js that you provided above. Do you have any update in this question?

    I repaired this in php:

    /* Draw calendar */
    
    $miesiac = date('n');
    
    $miesiac_pl = array(1 => 'Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Pa?dziernik', 'Listopad', 'Grudzień');
    $rok = date('Y');

    Here, script is checking current date in number format and changing it to name of month in your language. Last one is checking year. After that you have to change code for viewing current date and its done ??

    $cal_output .= "
    <div id=\"event-list-mini-cal-container\">
    	<h2 id=\"event-list-mini-cal-month\"><span id=\"event-list-mini-cal-prev\"><a href=\"?month=".date('Y-m', strtotime('-1 month', $calendar_month))."\">&laquo;</a> </span><span id=\"event-list-mini-cal-date\">".$miesiac_pl[$miesiac]." ".$rok."</span> <span id=\"event-list-mini-cal-next\"><a href=\"?month=".date('Y-m', strtotime('+1 month', $calendar_month))."\">&raquo;</a></span></h2>
    	<div id=\"event-list-mini-cal\">
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Current month untranslatable’ is closed to new replies.