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

Last updated by Noman 5 months, 1 week ago.

Assigned support staff: Noman.

Author Posts
May 11, 2019 at 6:50 pm #3791307

hlaingM

Hi, I am trying to change default English texts in theme or plugins. I was told by the theme and plugins developers that the way to change the default texts is by translating.

I want to change the default texts and translate the changed texts into the secondary language. How can I do so? Thank you.

May 12, 2019 at 7:30 am #3792581

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. If you want to change default language texts, you must edit the strings directly in the file of your theme/plugin. After edit that string, you need to scan your theme/plugin again.

To do this, first edit the strings in the necessary files. Then click on the WPML >> Theme and plugins localization. Make sure the option "Translate the theme and plugins using WPML's String Translation" is selected.

Scroll down and look the "Strings in the theme". Click on the "Scan the theme for strings" button.

If the strings are in the plugin, scroll down, and look for "Strings in the plugins". Select the correct plugin and at the end of the page, click on the "Scan the selected plugins for strings" button.

Then again in WPML >> String Translation, you can translate the new string.

Thank you

May 12, 2019 at 8:58 am #3792679

hlaingM

Hi, Thank you for your responses.

To avoid editing the theme/plugin files directly, the developers of the theme and the plugins suggest "localization/translation" of the texts instead of directly editing the theme/plugin files.

There are several obvious reasons to have to avoid editing the corresponding files directly. If there are many texts to change (or) if the plugin needs to be upgraded, all those changes will be flushed out.

(1) Like they suggest, how can I do "localization/translation" of the English texts instead of directly editing the corresponding files?

(2) I can see "create PO file" for some plugins under the section of "strings in the plugins" upon following some of the steps you mentioned. What is that "create PO file" for?

Thank you for your time.

May 12, 2019 at 10:16 am #3792799

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Here is an easy workaround to modify theme/plugin default strings without modifying core files:

- Go to WPML >> String Translation and find the string you want to edit in the default language.
- Select it and click on "change selected strings language" option from dropdown and change the language to the any "dummy" language that you will not use in the current site.
- Now you should be able to see the option to "translate" it in the original language.

Please let me know if this resolves your issue or you need further assistance.

Thank you

May 12, 2019 at 3:57 pm #3793289

hlaingM

Hi, I took the steps you described, and, yet, the texts on the front end have not changed (attached). I also did a hard clearing of the cache before testing. Is something missing? Thanks.

May 13, 2019 at 6:18 am #3795315

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Could you please uncheck ‘Assume that the original language of all strings is English’ checkbox from WPML >> Theme and plugins localization > Localization options section as you can see in the attached screenshot and see if this resolves your issue.

Thank you

May 13, 2019 at 9:29 am #3796473

hlaingM

Thank you. The altered English now appears. By the way, I had the question which was posed previously and I have not got the answer to.

(2) I can see "create PO file" for some plugins under the section of "strings in the plugins" upon following some of the steps you mentioned. What is that "create PO file" for?

Thanks,

May 13, 2019 at 12:41 pm #3798305

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Glad to see your issue is resolved.

Could you please read the reply here and I hope it will answers your question:
https://wpml.org/forums/topic/should-i-create-po-file/#post-1162527

Here is doc for more details:
https://wpml.org/documentation/getting-started-guide/string-translation/#import-export-po

If you need more info on this, please create a new ticket and we would be happy to help. This will help other users with similar problems to find solutions when searching the forum, We do not handle multiple issues in one same ticket as per support policy.
https://wpml.org/purchase/support-policy/

Thank you

May 13, 2019 at 12:53 pm #3798381

hlaingM

My issue is resolved now. Thank you!

May 14, 2019 at 7:33 am #3804309

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

[ changing ticket status ]