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.

This topic contains 27 replies, has 3 voices.

Last updated by Yvette 7 months ago.

Assigned support staff: Yvette.

Author Posts
November 15, 2021 at 9:15 am #9994565

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

Since you can only translate the TERMS - so you need to select "Configure Terms".

However, the recommended way to translate your terms is via:
Woocommerce > Woocommerce Multilingual > Attributes

Then use the pulldown to select which attribute terms to translate. But, again, you can also do it from the WordPress dashboard - it is a bit more clumsy.

November 18, 2021 at 5:34 pm #10025309

andreaB-8

Hi, check this page
hidden link

I've "Configura il modello" in all products but I don't know how/where translate.

Can you tell me how to do?

Thanks!

November 19, 2021 at 2:52 pm #10031871

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

Hello

Sorry for the delay. This looks like it is being put there by your theme.

Specifically, there is a string that is not localized properly and therefore is not translatable (see image). This is line 351 in the functions.php of the theme directory.

You need to correct this yourself or ask the theme author to do it.
Please look at this documentation:
https://codex.wordpress.org/I18n_for_WordPress_Developers

See image for example of what that line SHOULD look like

NotLocsalizedThemeText.png
ExmapleLocalization.png
November 19, 2021 at 3:00 pm #10031977

andreaB-8

Can you tell me how to customize this string from side?
I read your link but I don't understand.
Thanks!"

November 19, 2021 at 3:54 pm #10032253

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

You can try changing that line from this:

sprintf('%s%s configura il modello', $prefix, $price);

to this

sprintf( esc_html__( '%s%s configura il modello', 'armania' ), $prefix, $price );

Then rescan the theme here: WPML > Theme and plugins localization.

You should then see the string to translate registered in String Translation.
It would be best if your theme author does the change. We will not modify/touch code that we have not written ourselves.

November 20, 2021 at 8:11 pm #10036211

andreaB-8

--
Then rescan the theme here: WPML > Theme and plugins localization.
--

I don't know what to do here.
Can you detail me more?

And what do I've to search exactly?

Another thing, if you see there is even the text "Da" to translate ...that in English means "From"

So I've to all these text there are in Italian and I need to set right translation for English version.

Thanks

November 22, 2021 at 7:55 am #10041291

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

1. Scanning
Detailed steps here in our documentation:
https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#scanning-for-hard-coded-strings

2. You search for the string you want to translate and that was hard-coded in the php.
"%s%s configura il modello"

Since you have inserted it in Italian, you will need to first change the language to be Italian (see buttons on the bottom of the table).

Detailed steps in our documentation:
https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

3. I am not sure what you mean by your last remark:
"Another thing, if you see there is even the text "Da" to translate ...that in English means "From". So I've to all these text there are in Italian and I need to set right translation for English version."

If this does not have to do with the product page - please open a new thread for this topic. This thread will only cover issues related to the product page.

November 29, 2021 at 1:29 pm #10087927

andreaB-8

Thanks for your support, I think that I'm near to do....

I see even this in my function.php

$prefix = sprintf(%s ', __('Da ', 'iconic')); //cambiare qui la dicitura

I need to translate "Da"

How do I've to change this string in my function.php?

Thanks

November 29, 2021 at 2:56 pm #10088485

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

It´s hard to know what you are intending to do with just one line of code. However, it looks like you are trying to translate the "Da" prefix.

$prefix = sprintf(%s ', __('Da ', 'iconic'));

Try this to register the string "Da" and translate it:

$prefix = esc_html__('Da ', 'iconic');

You can then output this string in your code with echo()

echo $prefix;
November 29, 2021 at 4:12 pm #10089103

andreaB-8

Thanks for your help, you mean replace

$prefix = sprintf(%s ', __('Da ', 'iconic'));

with

$prefix = esc_html__('Da ', 'iconic');
echo $prefix;

Right??

November 29, 2021 at 5:00 pm #10089483

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

Correct - please note that I am not a developer so it may not work.

I also do not have access to other lines of code around it so I am not sure what you are tyring to do.

November 29, 2021 at 5:22 pm #10089681

andreaB-8

Thanks for your support!

November 29, 2021 at 5:28 pm #10089697

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Paris (GMT+02:00)

I hope we can close this ticket now. If this is no longer related to the product page translation, you will need to open a new thread.