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.

Our next available supporter will start replying to tickets in about 4.46 hours from now. Thank you for your understanding.

This topic contains 2 replies, has 2 voices.

Last updated by babakF-3 1 year, 9 months ago.

Assigned support staff: Yvette.

Author Posts
February 2, 2018 at 10:52 pm #1505946

babakF-3

I have a .po file with English -> Dutch strings.

I can tell my client to use WPML to override the Dutch translation in the .po file via string translations.

Sometimes, my client might want to change the English string. How can this be achieved without downloading the .po file, editing the .po file, uploading the .po file, updating the template files in which the string appears?

I can see another solution where I set my .po file to be Exotic_language -> Dutch and another one Exotic_language -> English, with the strings in Exotic_language being English references, so that the strings actually used in the English language version of the site can always be updated via WPML.
But, this seems a bit elaborate.

Is there not a way to override the original strings in the original language?

February 5, 2018 at 4:22 pm #1507465

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hello

1. Your suggestion
I have seem other clients do just what you described in order to be able to change the EN version of the string using String Translation. This means that the template files are treated as an exotic language and does not require editing. If they want to change the English, it is treated as if it was any other translated language.

So, this can work.

2. How to change the Source language
Normally, .po strings will be strings that are localized in the theme/plugin templates so, if you wanted to change the English (source) language, you are talking about changing the coded template file.

If you don´t change the template file and rescan the plugin/theme for new strings, then I don´t see how it would work as the gettext() formatting is what triggers the .po/String Tranlsation "lookup" in the first place.

In short, you must change the source language in the template file and/or .po file as your described.

Does this answer your questions?

February 5, 2018 at 5:05 pm #1507525

babakF-3

I'm not completely sure what you're suggesting under point 2, unless you refer to my initial thought of downloading/uploading the language files; indeed, the strings in the PHP templates don't change as well.

So, yeah, it seems my issue is resolved, though an option that would see WPML overwrite the default strings would be very useful.