Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by charleneR-2 3 weeks, 2 days ago.

Assisted by: Bobby.

Author Posts
June 6, 2024 at 8:47 pm

charleneR-2

Background of the issue:
I am trying to update the text inside links manually coded in the header.php file of my site hidden link. I changed the link text from 'Interior/Exterior Lights' to 'Deck Lights'. I found the 'Menu Item Label 12187' in 'String Translation' and added the translation for Spanish. The code looks like:  . Now I'm pretty sure that the reason I can't see the change I made is because I didn't change the right string.

Symptoms:
On the front end of the site, I still see 'Deck Lights' in English when switching to Spanish, despite adding the translation in 'String Translation' and emptying all caches.

Questions:
How do I find the correct string in 'String Translation'?
Why is the translation not showing on the front end after updating in 'String Translation'?

June 6, 2024 at 10:13 pm
June 6, 2024 at 11:58 pm #15713480

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for the access details!

Adding the missing text domain in the header.php code resolved the issue.

1. I added the missing text domain

<i class="fa fa-fw" aria-hidden="true">&#xf04b;</i>	<span class="maincats"><?php apply_filters( 'wpml_element_link', 627, 'page',__('Underwater Lights', 'woothemes')); ?></span> <br/>
<i class="fa fa-fw" aria-hidden="true">&#xf04b;</i> <span class="maincats"><?php apply_filters( 'wpml_element_link', 630, 'page',__('Deck Lights','woothemes')); ?></span> <br/>
<i class="fa fa-fw" aria-hidden="true">&#xf04b;</i> <span class="maincats"><?php apply_filters( 'wpml_element_link', 2051, 'page',__('Marine Hardware','woothemes')); ?></span> <br/>

2. WPML->Theme and plugins localization -> scan the child theme

3. WPML -> STring Translation -> locate the string under the correct domain (woothemes) and add the translation.

Screen Shot 2024-06-06 at 4.55.12 PM.png
June 7, 2024 at 5:45 pm #15717595

charleneR-2

Just wanted to take the opportunity to thank you for the help!!! I really appreciate it!

June 7, 2024 at 5:58 pm #15717605

charleneR-2

I added the two other language translations but I don't see them updated on the front end. Is this a cache issue or am I supposed to rescan any time I make a change?

June 8, 2024 at 12:42 am #15717946

charleneR-2

I scanned the child theme again and clicked the + signs to add the other two languages again. This time it worked. Thank you again for your help.

charleneR-2 confirmed that the issue was resolved on 2024-06-08 00:42:38.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.