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.

This topic contains 14 replies, has 2 voices.

Last updated by vittoriog-4 4 weeks, 1 day ago.

Assigned support staff: Mihai Apetrei.

Author Posts
August 9, 2019 at 2:58 pm #4371509

vittoriog-4

Hello, I use Snippets for creating some costum tabs on my product page. How i can translate that costum tab? where i can find the strings? hidden link

August 9, 2019 at 3:15 pm #4371557

vittoriog-4

The code is: https://pastebin.com/bmcY7R9B

August 9, 2019 at 5:32 pm #4372243

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for contacting WPML Support!

I will be happy to help you with this.

Can you please follow the steps in the documentation link below:
https://wpml.org/documentation/support/translating-the-theme-you-created/#making-the-theme-texts-translatable

That should help you make the strings recognizable by WPML.

You might have to re-scan the theme once again after you edit the code:
https://wpml.org/documentation/getting-started-guide/theme-localization/#scanning-themes-for-texts

Please let me know if this solved your issue or if you still need help.

I will be waiting for your response.

PS: Just a note that I won't be working on the weekend so I will be able to get back to you at the beginning of next week.

If you would prefer to not wait for a ticket response, you can mark this current ticket as resolved and in the process of creating a new ticket, you can select the "Live chat" option (it should be the default method now).

Kind regards,
Mihai Apetrei

August 15, 2019 at 11:59 pm #4403799

vittoriog-4

Hi Mihai, i can't find a solution can you help me?

August 16, 2019 at 3:14 pm #4407233

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi.

Sure, I will be more than happy to help!

1. Can you please let me know which are the exact strings that you want to send for translation?

2. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of the site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

The private box looks like this: hidden link

In order to be able to help you faster, can you also please paste your WPML Debug information in the Debug information field?
http://wpml.org/faq/provide-debug-information-faster-support/

I will be waiting for your response.

PS: Just a note that I won't be working on the weekend so I will be able to get back to you at the beginning of next week.

Kind regards,
Mihai Apetrei

August 20, 2019 at 12:40 pm #4423679

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for the credentials.

I was able to log into the backend.

Can you please confirm that the plugin we are talking about is "Code Snippets" ?

Please let me know.

Kind regards,
Mihai

August 21, 2019 at 9:27 am #4429403

vittoriog-4

Yes is that!

August 21, 2019 at 4:19 pm #4433917

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Great, thank you for the confirmation!

I went to WPML > String Translation (hidden link) and I searched for "Carta di credito" and then I searched for "spedizioni" and I was able to find the strings each time.

Can you please let me know if that is what you are referring to? Is this procedure not working you mean?

Please let me know.

Kind regards,
Mihai

August 23, 2019 at 9:02 am #4445575

vittoriog-4

Hello, no that strings you see are in the pages SHIPPING in ex. ES language: hidden link

The original page is hidden link

I need to translate CODE SNIPPETS shortcodes, if you see hidden link

This product is in the ES version, if you click under on PAGAMENTI - SPEDIZIONI - RESI & CAMBI are the tabs of code snippets plugin but aren't translated:

hidden link

Do you have skype or another app for chat?

August 26, 2019 at 12:21 pm #4458379

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for the extra information.

I will need a bit more time to take a look at this and properly test it.

I will get back to you as soon as I have more feedback.

Thank you for your patience, the weekend is back and now I am back at work.

I will keep you updated!

Kind regards,
Mihai

August 27, 2019 at 11:01 am #4465571

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for your patience.

I spent some more time looking at the custom code you sent me here (https://pastebin.com/bmcY7R9B).

It seems that you are using a simple echo (eg: echo 'content';) instead of a translatable echo (eg: echo __('content', 'your-context');).

To make that string translatable, you can use the WordPress functions like __() or _e(). Eg:

<?php echo __( 'Your String', 'your-context'); ?>

or:

<?php _e( 'Your String', 'your-context'); ?>

After that, if the code you told me it's used in the theme code:

1. Go to your WordPress backend
2. Go to WPML > Theme and plugins localization
3. Scroll to the "Strings in the themes" section, check the box next to your theme's name and click the blue "Scan selected themes for strings" button
4. After the scanning ends, go to WPML > String translation and see if you can find the strings you mentioned and translate them

Then go to WPML > String Translation and now you should be able to find and translate the string.

Please let me know if this solved your issue or if you still need help.

I will be waiting for your response.

Kind regards,
Mihai

September 15, 2019 at 11:35 am #4574503

vittoriog-4

Hello, let me try 🙂

September 15, 2019 at 11:40 am #4574505

vittoriog-4

Hello, i really don't know where I can put <?php echo __( 'Your String', 'your-context'); ?>

ex:

echo '<table>
<tbody>
<tr>
<td style="font-size: 14px">Paypal</td>
<td style="color: #888888">Carta di credito, visa, master card e altre carte.</td>
</tr>
<tr>
<td style="font-size: 14px">Bonifico bancario</td>
<td style="color: #888888">Vi verranno fornite tutte le coordinate alla conclusione dell’ordine (Il bonifico deve essere effettuato entro 4 ore dalla conferma dell’ordine, superato tale, l’ordine verrà annullato automaticamente dal sito)</td>
</tr>
<tr>
<td style="font-size: 14px">Ricaricando la “NOSTRA” postepay</td>
<td style="color: #888888">Troverete le coordinate a fine ordine (La ricarica poste pay deve essere effettuato entro 4 ore dalla conferma dell’ordine, superato tale, l’ordine verrà annullato automaticamente dal sito) </td>
</tr>
<tr>
<td style="font-size: 14px">Alla consegna</td>
<td style="color: #888888">Costo fisso di 5,99 €</td>
</tr>
</tbody>
</table>';

How I can make it for translate?

September 15, 2019 at 12:17 pm #4574557

vittoriog-4

Hello! i have find a solution for 50 % this is my code and, the FIRST tab i can find in STRINGS for translate (after the process to scan strings theme options) the SECOND tab (new_tab_2) i can't find in strings!

function new_tab_1() {

// The new tab content

echo __ ('<table>
<tbody>
<tr>
<td style="font-size: 14px">Paypal</td>
<td style="color: #888888">Carta di credito, visa, master card e altre carte.</td>
</tr>
<tr>
<td style="font-size: 14px">Bonifico bancario</td>
<td style="color: #888888">Vi verranno fornite tutte le coordinate alla conclusione dell’ordine (Il bonifico deve essere effettuato entro 4 ore dalla conferma dell’ordine, superato tale, l’ordine verrà annullato automaticamente dal sito)</td>
</tr>
<tr>
<td style="font-size: 14px">Ricaricando la “NOSTRA” postepay</td>
<td style="color: #888888">Troverete le coordinate a fine ordine (La ricarica poste pay deve essere effettuato entro 4 ore dalla conferma dell’ordine, superato tale, l’ordine verrà annullato automaticamente dal sito) </td>
</tr>
<tr>
<td style="font-size: 14px">Alla consegna</td>
<td style="color: #888888">Costo fisso di 7,99 €</td>
</tr>
</tbody>
</table>');
}

function new_tab_2() {
echo __ ('<br>
Per acquisti INFERIORI a 99 € con pagamento ricaricando la nostra PostePay, Bonifico o PayPal COSTO SPEDIZIONE:5,99
<br>
<br>
Con pagamento in CONTRASSEGNO COSTO SPEDIZIONE € 7,99
<br>
<br>
Per acquisti SUPERIORI ai 99,00 € con pagamento ricaricando la nostra PostePay, Bonifico o PayPal COSTO SPEDIZIONE: GRATIS
<br>
<br>
Effetuiamo la spedizione lo stesso giorno del pagamento con consegna entro le 24 ore');
}

September 15, 2019 at 2:35 pm #4574865

vittoriog-4

Ok, done! I only have to translate this, I don't understand how to insert the echo in this code:

$tabs['new_tab_3'] = array(
'title' => "CAMBI - RESI",
'priority' => 13,
'callback' => 'new_tab_3'
);