Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: How can I change the original language of a string?

Solution:

You can easily change the original language of the strings by going to WPML -> String Translation and then select the strings that you want to change and then click on the "Change language of selected strings" at the end of the table and then change the language.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/string-translation/

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 3 voices.

Last updated by Ahmed Ibrahim 3 years, 5 months ago.

Assigned support staff: Ahmed Ibrahim.

Author Posts
November 14, 2017 at 6:56 pm #1430587

marcelW-4

Hi,

I want to change the original language (English) of some string labels of the theme I'm using (mainly beds and baths into bedrooms and bathrooms).

The url of my website is: hidden link. I created a child theme. The original theme only has a .pot file. I created a new en_US.po file using the .pot file with Poeit, changed the labels and uploaded it in the /wp-content/themes/child-theme/languages folder. Whatever I try, I cannot make it work.. I'm really lost and hope you can help me with it. I also tried using the Loco Translate plugin. It changed the original string but again, it doesn't show on the website.

I also added this line to my fuctions.php file but also that didn't change anything.

function child_theme_slug_setup() {
load_child_theme_textdomain( 'realestate-7', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'child_theme_slug_setup' );

Thank you for your help. I would really appreciate a solution!

Screen Shot 2017-11-14 at 14.50.07 (3).png
Screen Shot 2017-11-14 at 14.50.07 (2).png
Screen Shot 2017-11-14 at 14.49.03 (2).png
Screen Shot 2017-11-14 at 14.48.18 (3).png
November 16, 2017 at 9:14 am #1432307

Ahmed Ibrahim
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi and thanks for contacting our support forum.

You can easily change the original language of the strings by going to WPML -> String Translation and then select the strings that you want to change and then click on the "Change language of selected strings" at the end of the table and then change the language, see here: https://wpml.org/documentation/getting-started-guide/string-translation/ under "Original Language of Strings"

Please let me know if that helps you.
Best Regards.

November 16, 2017 at 2:58 pm #1432866

marcelW-4

Hi Ahmed,

That doesn't really work. The original is English and it needs to stay English. I just want to change the label from Beds into Bedrooms. Also see my screenshot. It says:"The selected strings are currently in English. Change the language in:". "Toepassen" means Submit (which is greyed out because both current and new languages are the same)

How can this be done?

Thank you!

Screen Shot 2017-11-16 at 10.55.27 (3).png
November 16, 2017 at 3:24 pm #1432901

Ahmed Ibrahim
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Ok so as I understand that you want to change the original word itself from being "Bed" to be "Bedrooms" right?

If yes I just want you to know that the strings that appear at the string translation table are coming even from your theme files or from a (plugin or theme) option, so the correct way to change it is to find where is the source of the word is coming from and change it there, and this will be the correct and straightforward way to change it.

There is also a tricky way to do this through ST module, by assigning this string to a language that is not used by your site and then translates it to all your site languages, for EX:

You have a site with (English and Dutch) languages, so, for now, you can only translate this string to Dutch because the original language of it is English, so if you changed the original language of the string to be (for ex: "French") then the ST module will let you be able to translate it to "English" and "Dutch" and then you will be able to change the English word as you want.

Please let me know if that helps you.
Best Regards.

November 16, 2017 at 3:41 pm #1432951

marcelW-4

Hi Ahmed,

Yes, I want to change the original word itself from being "Bed" to be "Bedrooms".

I tried your tricky way to do this but that also didn't work. And to be honest I don't understand why... Please check my screenshot.

Thanks for your help!

Screen-Shot-2017-11-16-at-11.36.40-(3).jpg
November 16, 2017 at 3:44 pm #1432958

Ahmed Ibrahim
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi, and thanks for your reply.

Could you please provide me with temporary access (wp-admin and FTP) to your site in order to provide a better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

+ Please make sure that you have a full backup of your website and database. (Please don't ignore this)!
+ It'd be great if you give me an access for a test site where the problem is replicated.

Best Regards.

November 21, 2017 at 10:17 am #1436708

Ahmed Ibrahim
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

it was not working because you were selecting "Assume that all texts in PHP strings are in English" at WPML -> Theme and Plugin Localization, so I unchecked it and now it works.

Please let me know if that helps you.
Best Regards.

November 21, 2017 at 2:38 pm #1437093

marcelW-4

Awesome job! Thank you so much for your quick and helpful support! That's why I'm a WPML customer.

April 7, 2018 at 12:57 pm #1568386

solenS

Hi Ahmed
I have been reading this article because I have the same problem but I have not been able to solve it, I followed all the steps you indicated and nothing.

clear in Theme and Plugin Localization, Assume that the original language of all strings is English
and I still have the same problem, another thing, why does wpml tell me to activate.

Assume that the original language of all strings is English: Almost all themes and plugins have texts in English. Reducing the check for the string language simplifies and shortens the string translation process.

conclusion, you say to disable it and wpml says to activate it.

I really do not understand, I need a solution please. Thank you

April 10, 2018 at 10:43 am #1580975

Ahmed Ibrahim
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Solen,

This thread has been closed, so could you please open a new one for your issue and you will get all the help that you need.

Best Regards.