• Hi,

    I´m trying translate the pro version of Booking Ultra Pro plugin. I know the plugin does not declare its text domain. I have selected the source .POT file, added the FI finnish language and made the translation on the strings. Allthought the translations do not show. I took a look on the plugins php, and it says:

    function bup_comp_load_textdomain()
    {
    	   $locale = apply_filters( 'plugin_locale', get_locale(), 'booking-ultra-pro-complement' );
           $mofile = bookingup_comp_path . "languages/bookingup-$locale.mo";
    
    		// Global + Frontend Locale
    		load_textdomain( 'bookingupcomp', $mofile );
    		load_plugin_textdomain( 'bookingupcomp', false, dirname(plugin_basename(__FILE__)).'/languages/' );
    }
    
    /* Load plugin text domain (localization) */
    add_action('init', 'bup_comp_load_textdomain');
    add_action('init', 'bup_comp_output_buffer');
    function bup_comp_output_buffer() {
    		ob_start();
    }

    Loco quesses the domain to be: “booking-ultra-pro-complement” so the languange file becomes “booking-ultra-pro-complement-fi.mo”

    Changing the name of the mo-file does not help. I tried:
    “bookingupcomp-fi.mo” and “bup_comp-fi.mo” but they dont work.

    Am I close to the solution or do you have any tips?

    https://wordpress.org/plugins/loco-translate/

Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    The version 1.x branch of this plugin has no way of working with undeclared text domains.

    Your options are to rename the files every time, or use WordPress filters to manipulate the file ultimately loaded by the load_textdomain function call.

    Version 2.0 in develop will allow full control over configuration, but there will be no fix in the 1.x branch for this very common problem.

Viewing 1 replies (of 1 total)
  • The topic ‘Translations not showing with plugin’ is closed to new replies.