Skip to content Skip to sidebar

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

Problem:
The client is using the WPResidence theme, which is translated into Portuguese, and now they want to translate it back into English. They are encountering issues where English translated properties are showing up in the Portuguese list and custom PHP values are not being transmitted correctly. They are unable to find the strings for 'area' and 'quartos' in WPML, and there are issues with custom links, search buttons, and taxonomy terms appearing in the wrong language.

Solution:
1. To change the string language, select the string and change the language of the string using the option in WPML's String Translation interface.
2. To translate theme options, search for the strings in the WPML String Translation page and add them to the string translations. Once added, they can be translated into another language.
3. Update and re-translate the page to English in WPML, ensuring that the values are copied over correctly.

If this solution doesn't look relevant, please open a new support ticket.

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.

Tagged: ,

This topic contains 34 replies, has 2 voices.

Last updated by Kor 1 year, 8 months ago.

Assisted by: Kor.

Author Posts
October 30, 2023 at 4:55 pm #14694023

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Ok, I need to check your production site again to see if the Language Domains are working correctly.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

November 1, 2023 at 3:49 pm #14708953

thomasL-104

same credentials like before

Screenshot(17).png
November 1, 2023 at 8:41 pm #14711165

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

It seems to work now and could you please check? hidden link

Screenshot_219.jpg
November 3, 2023 at 2:13 pm #14726355

thomasL-104

Yes, now it open the elementor, but on some sites don´t get copy things , I will attach images,
also like you can see some graphics arent working proper

Screenshot(19).png
Screenshot(20).png
November 3, 2023 at 2:26 pm #14726479

thomasL-104

wpml has the option to change the default language of the site, is this maybe solving some problems, as like I said, its an english theme, i translated in portugues and use now the second as english, ..so wpml shows me portugues words with english flags to translate

Screenshot(21).png
November 3, 2023 at 2:50 pm #14726609

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

You can change the string language as shown in this screenshot. You just need to select the string and "change the language of the string" using the option shown in the attached screenshot. Could you give this a try?

Screenshot_224.png
November 3, 2023 at 4:42 pm #14727401

thomasL-104

yes , I tried. You know, I have already 3 other portals ALSO with wpresidence, I made them in english as main language and afterwards I translated them in portugues..was working seamless. now occuring more problems, as I was translating the english theme with a third party plugin in portugues (don´t know how much was mixing this up) and now back to english.
Even english translated porperties find their way to the portugues list of properties.. its all not working 100%.
to be honest I am thinking to do te bunch of work and start at 0 again..

Screenshot(24).png
November 3, 2023 at 4:48 pm #14727439

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I'm not so sure what you did earlier that changed the language in the settings. But when I inspected your Website, all theme options are in Portuguese.

Anyway, can you fix the strings issue now by changing the string language? Also, what is the screenshot about? Are you referring to the missing image? Where can I see this?

November 6, 2023 at 4:53 pm #14740275

thomasL-104

This image is nothing about graphic, its about a value which don´t get transmitted, it´s a simple custom php, but it´s a custom whats included in wpresidence..
it´s just named different with another value, but don´t get forwarded to the english part.
I can´t find the string with wpml which I created.. area and quartos
Should I get in touch with wpresidence?
The part which is seperated with /* */ is the original and there it works.
<?php
$property_size = wpestate_get_converted_measure( $post->ID, 'property_size' );
$quartos = get_post_meta($post->ID,'quartos',true);
$area = get_post_meta($post->ID,'area',true);
$property_bedrooms = get_post_meta($post->ID,'property_bedrooms',true);
$prop_id = $post->ID;
?>
<div class="property_unit_type5_content_details_second_row">
<?php

if($area!='' && $area!=0 ){
print '<div class="inforoom_unit_type5">'.esc_html($area).'<span></span></div>';
}

if($quartos!='' && $quartos!=0 ){
print '<div class="inforoom_unit_type5">'.esc_html($quartos).' '.esc_html__('BD','wpresidence').'</div>';
}

/*if($property_bedrooms!='' && $property_bedrooms!=0 ){
print '<div class="inforoom_unit_type5">'.esc_html($property_bedrooms).' '.esc_html__('BD','wpresidence').'</div>';
}

if($property_size!='' && $property_size!=0){
print '<div class="inforoom_unit_type5">'.trim($property_size).'</div>';//escaped above
}*/

?>
</div>

Screenshot(26).png
Screenshot(25).png
November 7, 2023 at 7:45 pm #14751507

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've checked your code and I could see the "wpresidence" text domain. Which means, you just need to scan the theme as explained here https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/ and it will appear in the string translation for translation. Could you give this a try?

November 7, 2023 at 9:09 pm #14751743

thomasL-104

Hi Kor , I know that part, but it just don´t get delivered in the new language, even translated

November 8, 2023 at 8:25 am #14753483

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Could you get the theme author to check your custom code? Maybe you can try to revert it to the default and scan the theme again. Then, change the string language if required and translate it.

November 14, 2023 at 1:18 pm #14798061

thomasL-104

ok, I check with the theme autors, but they ended up with, thats the problem of WPML. So I use the custom fields from the normal theme, see screenshots, and not one get translanted/forwarded/copied.
That is the issue

Screenshot(28).png
November 14, 2023 at 3:37 pm #14800201

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I understand what's going on now. To translate the theme options, you need to search here hidden link and add it to the string translations as shown in the attached screenshot.

Once it's added to the string translation, you can then translate it to another language.

Screenshot_281.png
November 14, 2023 at 4:12 pm #14800629

thomasL-104

Hi Kor, I followed your explanation, but still the values of the custom fields don´t get delivered in the english language

Screenshot (5).png
Screenshot (6).png