Saltar navegación

Este hilo está resuelto. Aquí tienes una descripción del problema y la solución.

Problem:
The client was unable to translate a specific string on their website, even after deleting the string from the string translation list, rescanning the theme, and clearing the WPML cache. The string would appear translated only when the 'scan while browsing' option was activated, but would revert to being untranslated when this option was deactivated.
Solution:
We recommended ensuring that the text in the Pricing section was correctly implemented for translation support. Specifically, the text should be wrapped in the Gettext function with the appropriate text domain. We provided a guide to help with this process: Translating the Theme You Created.
Further steps included:
1. Navigating to "WPML > Theme and Plugins Localization".
2. Ensuring that the Localization options were selected and the text domain of the theme was added.
3. Scanning the theme again for strings.
4. Checking the string translation section to see if the string appeared.

If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

Este es el foro de soporte técnico de WPML, el plugin multilingüe de WordPress.

Todas las personas pueden leerlo pero solo los clientes de WPML pueden ingresar comentarios. El equipo de WPML responde en los foros 6 días a la semana, 22 horas por día.

Este tema contiene 3 respuestas, tiene 2 voces.

Última actualización por Prosenjit Barman hace 3 meses, 3 semanas.

Asistido por: Prosenjit Barman.

Autor Entradas
septiembre 9, 2024 en 3:50 am #16153389

hectord-7

Hello again.

The complianz problem is resolved by adding that code to the functions.php. Thanks

However, there is one more string (crazy to me that only happens with one) that is not being translated on our site. Is the one you can see here enlace oculto and that I highlighted on the image I am attaching.

This is what I have done after not being able to make it work):

- I went to string translation and deleted this string from the list.
- I went to theme and plugin location and scanned the theme again.
- I cleared WPML cache

And now, the translation obviously doesn't work (the string is not translated) but the string also doesn't appear on the string list. Not even in the admin texts.

I have activated the option to scan while browsing and this is the crazy part:
- If the option is activated (can't be for more than 2 hours) the strings shouw up translated. Which I don't understand because I haven't even translate them.
- If I turn off that check, the string are back to not being translated and they still don't show up on the string list. So I can't translate them.

So I don't know what to do.

Thanks

septiembre 9, 2024 en 4:57 am #16153411

Prosenjit Barman
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Dhaka (GMT+06:00)

Hello There,
I hope you're doing well.

I understand the issue you're experiencing. If the Pricing section is custom-coded, could you please verify that translation support is correctly implemented for the text that isn't appearing translated? Specifically, the text should be wrapped in the Gettext function with the appropriate textdomain so that it can be translated via the string translation feature.

Please check this guide to understand the overall process.

If the translation support has been correctly implemented for the text and you're still encountering issues with translating the string, please try the following steps.

1. Go to "WPML > Theme and Plugins Localization".
2. Make sure that the Localization options are selected and the text domain of the theme is added in the textbox within the Localization option.
3. Once done, scan the theme again for strings
4. Once the scan is completed, go to string translation and check if you can see the string.

Please check and let me know how it goes. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

septiembre 10, 2024 en 2:34 pm #16162245

hectord-7

Sorry,

It is still not working. The string is set the same as all the other strings we have on the theme. And this is the only one not working.

I have done the 4 steps. But the string still doesn't show on the string list to be translated. And again, if I set the checkbox to check strings while browsing, the string shows up translated on the front of the website.

Thanks

septiembre 12, 2024 en 9:41 am #16170012

Prosenjit Barman
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Dhaka (GMT+06:00)

Hello There,
I hope you're doing well.

Thank you for trying the suggestion. Could you share a screenshot of the pricing section code? I’d like to check how the text is added, specifically whether it's registered as a single string or combined with the number. Based on that, I'll let you know the next steps.

Looking forward to your response and I'm always here to help.

Best regards,
Prosenjit

septiembre 12, 2024 en 12:17 pm #16170898

hectord-7

Hello.

We have been trying different changes in the code and finally WPML detected the strings. And it is working now. Funny thing is that it has the same code as before, but now works.

Anyway, thanks a lot for the help!