• Month names appear correctly in spanish, but week day abbrevations are in english.

    Very good plugin! Thank you for your support.

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

Viewing 1 replies (of 1 total)
  • Plugin Author ishitaka

    (@ishitaka)

    Hi,

    The text of the day of the week uses the translation text of the plugin. Currently, the days of the week do not seem to be translated in Spanish.

    https://translate.www.ads-software.com/locale/es/default/wp-plugins/xo-event-calendar/

    You can also change it by inserting the following code into your theme’s functions.php.

    add_filter( 'gettext_with_context_xo-event-calendar', function( $translation, $text, $context ) {
    	$texts = array(
    		array( 'S', 'Sunday initial', 'D' ),
    		array( 'M', 'Monday initial', 'L' ),
    		array( 'T', 'Tuesday initial', 'M' ),
    		array( 'W', 'Wednesday initial', 'X' ),
    		array( 'T', 'Thursday initial', 'J' ),
    		array( 'F', 'Friday initial', 'V' ),
    		array( 'S', 'Saturday initial', 'S' ),
    	);
    	foreach ( $texts as $key => $value ) {
    		if ( $value[0] === $text && $value[1] === $context ) {
    			return $value[2];
    		}
    	}
    	return $translation;
    }, 10, 3 );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Weekday names in local language’ is closed to new replies.