How can we improve WooCommerce?

String translation for the Taxamo plugin

Just a little question. I'm using the WooCommerce Taxamo plugin (BTW great plugin) and I saw that some of the strings are not translatable by WPML. Is it possible to incorporate this feature? If needed, I'm happy to help.

3 votes
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Adri Oosterwijk shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

6 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
  • Adri Oosterwijk commented  ·   ·  Flag as inappropriate

    Same for the following:

    In class-wc-ta-request.php are those lines (247-250):

    $error_message = apply_filters( 'woocommerce_taxamo_validation_error_message_location', "We couldn't confirm your location." );

    if ( 'yes' === WC_TA_Integration::$enable_self_declaration ) {
    $error_message .= apply_filters( 'woocommerce_taxamo_validation_error_message_manually_validate', " Please manually validate it." );

    I had to change it to:

    $error_message = apply_filters( 'woocommerce_taxamo_validation_error_message_location', __("We couldn't confirm your location." , 'woocommerce-taxamo' ) );

    if ( 'yes' === WC_TA_Integration::$enable_self_declaration ) {
    $error_message .= apply_filters( 'woocommerce_taxamo_validation_error_message_manually_validate', __(" Please manually validate it." , woocommerce-taxamo) );

    to get it translatable.

    Please work with priority on a sustainable solution.

    Regards,

    Adri

  • Adri Oosterwijk commented  ·   ·  Flag as inappropriate

    Same for: the lines 74 and 75 in the same file:

    // Add the new tax rate for this transaction line
    $tax_manager->add_tax_rate( $tl->product_type, 0.00, 'European VAT' );

    Change it to:

    // Add the new tax rate for this transaction line
    $tax_manager->add_tax_rate( $tl->product_type, 0.00, __('European VAT' , 'woocommerce-taxamo') );

    I have read somewhere that it is not a very reliable solution to embed gettext statements in variables but this is the kind it should work. I trust that you are able to find a reliable solution for this if the above turns out to be not so. This applies also to my last comment.

  • Adri Oosterwijk commented  ·   ·  Flag as inappropriate

    Went digging again and it is in: class-wc-ta-checkout-vat.pho

    On line 88 and 89 you see:
    // Add the new tax rate for this transaction line
    $tax_manager->add_tax_rate( $tl->product_type, $tl->tax_rate, strtoupper( 'VAT ' . $country_code . ' ' . $tl->product_type ) );

    the text 'VAT' is not translatable.
    I changed it to:

    // Add the new tax rate for this transaction line
    $tax_manager->add_tax_rate( $tl->product_type, $tl->tax_rate, strtoupper( __('VAT', 'woocommerce-taxamo') . ' ' . $country_code . ' ' . $tl->product_type ) );

    Because it is not a template file I can't add it to my child theme. That means with every update of the Taxamo plugin this customization is lost. It would be great when could be in the standard file.

    Cheers!

  • Adri Oosterwijk commented  ·   ·  Flag as inappropriate

    mmm must missed your message.

    I don't use .mo files, I'm using WPML to translate strings to languages. The main "problem" is the VAT message on the checkout page and the invoice. It displays the text "VAT NL E-SERVICE" where I want to display "BTW NL E-SERVICE" for Dutch (and of course the right translations for any other language I plan to add to the site.

    Adri

  • Chris commented  ·   ·  Flag as inappropriate

    Hi Adri,
    where do you exactly place the *.mo translation files and how is the namingconvetion?
    I've been trying around without any result.
    Any help is very appreciated, thanks.
    All the best,
    Chris

WooCommerce: Category - External Product/Service Integrations

Feedback and Knowledge Base