Can't for the life of me find woocommerce strings that need translation

Hello

I have some sites using your theme and WooCommerce. I have followed all your instructions on how to translate WooCommerce but there are still some strings that are in English when I need to to be in Icelandic. For example on here https://www.trs.is/netverslun/ if you add a product to the cart the cart appears on the left and the text View cart is still visible.
Also when the product has been added to the cart and you proceed to checkout the Shipping text is still in English.

Can you help me with this. All the sites have the X child theme active. I have copied the woocommerce folder over to the child theme and I have multiple strings in my functions.php file for translation.

Hi there,

Thanks for writing in.

Maybe it’s due to cache, I don’t see any View Cart, what’s in there is Skoða körfu. And when I translated it to English, yes, it’s the translation for View Cart.

The shipping text translations are working too, I don’t see any English text. Please clear your browser cache and test it again.

Thanks!

Hello

I really thought I had cleared my cache but now I can see that Skoða körfu is showing. But the shipping text is still in English when you click on Skoða körfu (View cart).

It’s visible on both https://www.trs.is/netverslun/karfan-min/ and http://www.jotunn.is/vefverslun/karfan-min/

Hi,

I checked but didn’t see any english text on that page.

https://www.screencast.com/t/ULYZtKja

Can you provide us a screenshot.

Thanks

Here are the screenshots, you probably don’t see the shipping because those companies only ship in Iceland so you have to select that country.

Could not upload another image but it’s the same on www.jotunn.is

Hi there,

Would you mind providing login credentials for Iceland country? There is no way for me to access the shipping selection.

Thanks!

I can add your country to the list of countries we sell to if you tell me what country you are in :slight_smile:

Hi,

The support staff are based in different countries and we are not sure who will handle this by the time you respond. But can you try adding Philippines.

Thanks

I have added the Philippines to the list.

Hello There,

Thanks for updating in! I have checked it again and still no shipping text.


How did you translated WooCommerce? Are you using a translation file?
Can we check your WooCommerce translation files?

Since you have a child theme, the fastest way to resolve this, you can add this custom function in your child theme’s functions.php file

// Translate Shipping
// =============================================================================
add_filter('gettext', 'translate_text' );
function translate_text($translated) { 
  $translated = str_ireplace('Shipping', 'Insert your translation', $translated);
  return $translated; 
}
// =============================================================================

Please let us know how it goes.

Hello

The shipping text is still there. I have added the code you provided but that does not change anything. I have this function in my functions.php file for the child theme and every translation string works except for the shipping one.

add_filter('gettext', 'x_translate_text' , 20, 3);
add_filter('ngettext', 'x_translate_text' , 20, 3);
function x_translate_text ( $translated_text, $text, $domain ) {

$translation = array (
'Your cart is currently empty.' => 'Karfan þín er tóm eins og er',
'Return To shop' => 'Fara aftur í netverslun',
'%s removed. %sUndo?%s' => '%s tekin úr körfunni. %sSetja vöru aftur í körfu%s',
'Update cart' => 'Uppfæra körfu',
'Proceed to checkout' => 'Ganga frá greiðslu',
'Cart totals' => 'Karfan',
'Billing details' => 'Upplýsingar um greiðanda',
'Company name' => 'Nafn fyrirtækis',
'Street address' => 'Heimilisfang',
'Postcode / ZIP' => 'Póstnúmer',
'Order notes' => 'Aðrar upplýsingar',
'Shipping' => 'Sendingarmáti',
'View cart' => 'Skoða körfu',
'Notes about your order, e.g. special notes for delivery.' => 'Skrifaðu aðrar upplýsingar sem þú vilt að komi fram hér.',
'I&rsquo;ve read and accept the <a href="%s" target="_blank">terms & conditions</a>' => 'I&rsquo;ve read and accept 
 the <a href="%s" target="_blank">terms & conditions</a>.'
);

if( isset( $translation[$text] ) ) {
return $translation[$text];
}

return $translated_text;

}

Hi,

In that case, would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

Here it is

Hi there,

I made some changes in your code and it has no effect either, seems like that text is not connected to any textdomain at all. Do you use custom templates on cart page? Would you mind providing your FTP login credentials as well?

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.