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 brianG-6 4 months, 3 weeks ago.

Assigned support staff: Marcos Vinicios Barreto.

Author Posts
May 23, 2019 at 6:42 pm #3878805

brianG-6

Hello,

I was looking for more information on how string translations work. If I translate a word in my theme, will WPML translate that word everywhere it appears? For example, I have _e('Completed','custom-domain'); in one of my template files. Will it translate 'Completed' everywhere it shows on the site, or only other locations where it's wrapped in a GetText?

My goal here is to invent a workaround for using a plugin that is not natively WPML compatible. I'm wondering if the following would work:
- Create a file in my theme that displays all the terms the plugin uses in the frontend in GetText calls
- Send the strings for translation
- Will these strings then be translated in the plugin as well if they're the same?

Thanks!

May 24, 2019 at 12:21 am #3879973

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for contacting WPML Support. WPML will scan the files individually and it will register all the strings according they occurrencie in the files. In other words, the strings will be registered individually, if in the file-1.php has a 'sample' string and in the file-2.php it also has a 'sample' strings, WPML will scan both files and register the two 'sample' strings as they appear in different places. See: https://wpml.org/documentation/getting-started-guide/theme-localization/. Please, let me know if you need any further details and clarifications, have a nice day.

May 24, 2019 at 1:54 pm #3885423

brianG-6

Ok, thank you!

May 24, 2019 at 2:47 pm #3885855

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Please, mark this ticket as solved if your questions were replied properly. Thank you!

May 28, 2019 at 6:14 pm #3909329

brianG-6

My issue is resolved now. Thank you!