• Resolved dacie00

    (@dacie00)


    Hi,

    I’m trying to translate the PDF invoices but I’m having trouble with “Tax” not being translatable. I’ve translated it for Woocommerce, and I can’t find the string in the plugin translations with Loco, and I couldn’t find it in the source code either. Default theme or disabling plugins didn’t help.

    Image of issue – https://prnt.sc/sKO_gvs1OsJ0

    • This topic was modified 3 weeks ago by dacie00.
    • This topic was modified 3 weeks ago by dacie00.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    I have a similar problem.

    In the checkout of woocommerce, everything is fine:

    i.e. <bdi>137,00?€</bdi>?<small>(inkl.?21,87?€?19% MwSt.)</small>

    At the pdf-invoice:

    137,00 € (inkl. 21,87 € ( vat 19% ))

    I don’t find any option to change it in the invoice.

    Who can help me?

    Plugin Contributor Yordan Soares

    (@yordansoares)

    I’m trying to translate the PDF invoices but I’m having trouble with “Tax” not being translatable. I’ve translated it for Woocommerce, and I can’t find the string in the plugin translations with Loco, and I couldn’t find it in the source code either. Default theme or disabling plugins didn’t help.

    Hi @dacie00,

    The “Tax” label for the totals comes from WooCommerce directly, but if you want to customize it just in the PDF invoice, you could try the following code snippet:

    /**
    * PDF Invoices & Packing Slips for WooCommerce:
    * Customize the VAT label on the PDF documents.
    */
    add_filter( 'wpo_wcpdf_woocommerce_totals', function( $totals, $order, $document_type ) {
    foreach ( $totals as $total_id => $total ) {
    if ( $total['label'] == 'Tax') {
    $totals[$total_id]['label'] = __( 'VAT', 'woocommerce' );
    break;
    }
    }
    return $totals;
    }, 10, 3 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide:?How to use code snippets

    I have a similar problem.

    Hi @1stsol,

    Could you check which language you have selected in your WordPress dashboard > Settings > General?:

    Please note that, although our plugin is available in German (de_DE), for?other German locales (Formal, Switzerland, Switzerland Informal, Austria), you’ll need to download the translation files from German (de_DE), and?manually install it in your site, or even better, use the German (de_DE) as fallback.?There is a great plugin to help you with this:?Language Fallback

    After installing the plugin, you just need to go to?Settings > General, find the?Language Fallback Settings?and choose?Deutsch:

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @1stsol,

    Since we haven’t heard back from you in the last two weeks, we’re assuming you solved this issue, so I’ll go ahead and mark this ticket as Resolved.

    Feel free to reply to this topic is you still need help with this, or open a new topic if you have any other questions!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.