• Hello

    I have small problem with translation to word “Regular holiday” in legend below calendar widget. Even if I translated this word to my “polish” language by Loco translate plugin by creating file xo-event-calendar-pl_PL.po then still is displayed: “Regular holiday”. Other words are translated well. I think that must be small bug in code or something.

    Look at this page on right sidebar: https://www.archei-trener.pl/kursy/

    Another question:

    Is any simple way to use your calendar plugin in input text field to choose event from calendar and put it to input text field?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author ishitaka

    (@ishitaka)

    Hi,

    In the current version, this is not a translation text. Please consider this as the current specification.

    It is possible to convert characters into translation text using the code below.

    In the theme’s functions.php,

    add_filter( 'xo_event_calendar_footer', function( $html, $args ) {
    	$html = '<div class="holiday-titles">';
    	$holiday_settings = get_option( 'xo_event_calendar_holiday_settings' );
    	if ( $holiday_settings ) {
    		$holidays = explode( ',', (string) $args['holidays_string'] );
    		foreach ( $holidays as $holiday ) {
    			if ( array_key_exists( $holiday, $holiday_settings ) ) {
    				$html .= '<p class="holiday-title"><span style="background-color: ' . esc_attr( $holiday_settings[$holiday]['color'] ) . ';"></span>';
    				$html .= esc_html__( $holiday_settings[$holiday]['title'], 'xo-event-calendar' );
    				$html .= '</p>';
    			}
    		}
    	}
    	$html .= '</div>';
    	return $html;
    }, 10, 2 );
    

    Is any simple way to use your calendar plugin in input text field to choose event from calendar and put it to input text field?

    Event posts are custom posts of post type ‘xo_event’. It can be obtained using the normal method of obtaining custom posts.

    Thread Starter dares89

    (@dares89)

    Thanks very much for solution to translation.

    In second question I meant to use your “calendar with events” like this example: https://jqueryui.com/datepicker/ . User can select only event from calendar and give it to <input type=”text”> field

    Is possible?

    • This reply was modified 1 year, 2 months ago by dares89.
    Plugin Author ishitaka

    (@ishitaka)

    This is a usage that is not intended for plugin. You will be writing quite a bit of code.

    Thread Starter dares89

    (@dares89)

    Ohh what’s a pitty. Anyway thanks for help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No translation for word “Regular holiday”’ is closed to new replies.