Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter generosus

    (@generosus)

    Update:

    So, based on the HTML code provided (see above) we fixed our issue using the JS codes provided below.

    Unfortunately, when we switch to another calendar month, the same old issue reappears. That is, the JS code is not loading for any month other than the current month.

    <script> jQuery('td.day_unavailable').addClass('notranslate'); </script>
    <script> jQuery('td.day_available').addClass('notranslate'); </script>

    Any ideas or code snippets that can take care of the above?

    Thank you.

    Plugin Author edo888

    (@edo888)

    Hi,

    You will need to find a way to add notranslate class to the HTML code and not via javascript when the page is rendered.

    You may consult your calendar developer support to find out which file you need to modify.

    Thanks! ??

    Thread Starter generosus

    (@generosus)

    Hi @edo888

    We got that!

    We were able to fix our issue using the code snippet provided below.

    It prevents all calendar days (numbers) from being translated into calendar days (words).

    Caveat: It also prevents the Month and Day of the Week embedded in the calendar table from being translated. Good enough for us since this solution yields a clean UI.

    function disable_translation_calendar_days() {
      if (is_page ('17713')) { 
        ?>
    	<script> 
    		jQuery('div.grid-row').addClass('notranslate'); 
    	</script>
        <?php
      }
    }
    add_action('wp_footer', 'disable_translation_calendar_days'); 
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Strange Behavior | Calendar Numbers Translated Into Words’ is closed to new replies.