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 4 replies, has 2 voices.

Last updated by Radu 1 month, 1 week ago.

Assigned support staff: Radu.

Author Posts
September 6, 2019 at 12:50 pm

tahirU

Hi,
The default language of the system is English.
I want to change the word "Shop" that appears in the screenshot.
hidden link

I created the .mo and .po files to change the word "shop".
hidden link

But "String translation" section still says "Shop".
hidden link

Site: doyuk.com.tr

September 8, 2019 at 7:43 am #4530731

Radu
Supporter

Languages: English (English )

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

Hey,

Thank you for reaching out the WPML support!

In order to change this word on your website, you need to look for the place that it's coming from. Most probably, you'll find this Shop word inside the theme. In this case, you'll need to change it inside the PHP file, then go to Dashboard → WPML → Theme and plugins localization. Here, just select the theme and scan it again for strings. Once you did that, you'll be able to find the text you recently changed in Dashboard → WPML → String translation. Please give this a try and tell me how it goes.

Thanks,
Radu

September 9, 2019 at 7:16 am #4534011

tahirU

Dear Radu,
It is not a good solution to make word changes from within the code.
I'll have to make the same change over and over again when the theme is updated.

Shouldn't I make this change with ".pot - .po"?

September 9, 2019 at 12:36 pm #4537119

tahirU

You respond late.
I'd appreciate it if you made a quick comeback.

September 9, 2019 at 9:55 pm #4540297

Radu
Supporter

Languages: English (English )

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

Hey,

You cannot change a string from the theme (or plugin) through the PO or POT file. When the text is displayed on the website, it's taken from the actual PHP file. The PO files are generated from the theme files, not the other way. That's why changing this string this way won't work.

The trick that I can think of is to create a child theme copy to it the file where this string is coming from. Once you did this, just change the string with the new one. This way, you won't need to do the same change when an update of the theme is available.

The last step is to go to Dashboard → WPML → Theme and plugins localization, look for the child theme, and scan it for strings. This way, the new string will be available for translation in Dashboard → WPML → String translation.

You can give this a try and tell me how it goes.

Thanks,
Radu

The topic ‘[Closed] Default Word Change’ is closed to new replies.