• Hi,
    I have a stupid plugin which is supposed to work when a different language is defined. But it doesn’t!

    I found some text strings hardcoded inside the code, and which stay the same, in English, no matter which language is selected.

    Here’s the code:
    `if ( $tax_total_display == ‘itemized’ ) {

    foreach ( $tax_string_array as $tax_string ) {

    // Tax included.
    if ( $tax_display == ‘incl’ ) {

    $tax_line = sprintf(
    /* translators: %s: tax included */
    __( ‘Includes %s’, ‘woocommerce-german-market’ ),
    $tax_string
    );
    $tax_line_class = ‘wgm-tax includes_tax’;

    } else { // Tax to be added.

    $tax_line = sprintf(
    /* translators: %s: tax to be added */
    __( ‘Plus %s’, ‘woocommerce-german-market’ ),
    $tax_string
    );
    $tax_line_class = ‘wgm-tax excludes_tax’;
    }

    // Append tax line to total.
    $tax_total_string .= sprintf( ‘<br class=”wgm-break” /><span class=”%s”>’, $tax_line_class );
    $tax_total_string .= $tax_line;
    $tax_total_string .= ‘</span>’;
    }

    I am talking about those “Includes %s” or “Plus %s” strings ….

    Could you help?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    This code looks fine, I think the localization is correct. Maybe the translation files (.mo and .po) are missing? Or maybe this code is called too soon, before the plugins initialize. But I need the whole code to figure out.

    Thread Starter candy2012

    (@candy2012)

    There are some localization files in there, but they are obviously not called out …
    I can send you the plugin if you give me an address …

    Thanks a lot

    Yes you can send me the plugin at my address: [email protected], I’ll have a look.

    Thread Starter candy2012

    (@candy2012)

    Thanks so much! I’ve just send it, it should be with you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘plugin strings do not get translated’ is closed to new replies.