Diwali

Wishing you joy this Diwali and Halloween! Enjoy up to 20% OFF on all addons!

Claim Offer
01Day 03Hr 47Min 21Sec
Diwali

Language translation missing

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 4 reply threads
  • Author
    Posts
    • #29324
      Flore
      Guest

      Hi again,

      I found a translation missing.
      When I create a new woocommerce bookings product :
      In Disponibility tab : Bookable “NO” “YES”.

      Waiting for, I add it to my own language file 😉

      I add this in my child theme waiting for a correction :

      add_filter( ‘resource_manager_fields_availability’, function($ressource_availability){
      //Modify the text because it is not translatable
      $ressource_availability[‘_wc_booking_availability_rules’][‘options’][‘bookable’][‘options’] = array( ‘no’ => __(‘Non’, ‘les2frangines’), ‘yes’ => __(‘Oui’, ‘les2frangines’) );

      return $ressource_availability;

      }, 20, 1);

      Thank you for your work,
      Your extensions are powerful !

      Flore

    • #29328
      Flore
      Guest

      I forget to mention the file where translation are missing, if I can help :

      wc-frontend-manager-ultimate\core\class-wcfmu-wcbookings.php
      in the select boxes, the ‘YES’ and ‘NO’ choices are not translatables.

    • #29329
      WCFM Forum
      Member

      Hi,

      Kindly use this to add translation for this –

      function wcfm_custom_translate_text( $translated ) { 
      	$translated = str_ireplace( 'no', 'no', $translated );
      	$translated = str_ireplace( 'yes', 'yes', $translated );
      	$translated = str_ireplace( 'NO', 'no', $translated );
      	$translated = str_ireplace( 'YES', 'yes', $translated );
      	return $translated; 
      }
      add_filter('gettext', 'wcfm_custom_translate_text'); 
      add_filter('ngettext', 'wcfm_custom_translate_text');

      Add your translated string at 2nd parameter for “str_ireplace” function.

      Thank You

    • #29332
      Flore
      Guest

      Thank you ! Nice to know.

    • #29333
      WCFM Forum
      Member

      You are welcome 🙂

Viewing 4 reply threads
  • The topic ‘Language translation missing’ is closed to new replies.