Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 5 replies, has 0 voices.

Last updated by Long Nguyen 2 weeks ago.

Assisted by: Long Nguyen.

Author Posts
October 23, 2024 at 10:13 am

oleksiiB-3

Background of the issue:
I am trying to translate Elementor blocks in the Listing Templates section, specifically the 'Classic' template, on my site hidden link using WPML. I have added Elementor blocks to the page, and their strings were automatically added to the WPML strings editor. I translated them to a second language.

Symptoms:
The translation does not appear on the website, and only the default language is shown in both cases.

Questions:
Why doesn't the translation appear on the website after translating the strings in WPML?

October 23, 2024 at 11:10 am
October 28, 2024 at 8:08 am #16336186

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Olekssi,

Thank you for contacting WPML support, I’m happy to help you with this issue.

I can translate the listing description from Ukrainian to English by making a small change to the description, and re-translate the listing.

However, I cannot translate the contact section below the description, which is created by the Classic template. It could be a compatibility issue between WPML, Motors theme and its addon plugins.

To be able to report the compatibility issue we need to replicate the issue on a clean installation. I created a clean installation of WordPress, WPML, and all necessary WPML add-ons. You can access the WordPress dashboard using the link below: hidden link

Kindly follow the steps below:

- Don’t restore your site there.
- Install Motors theme and its addon plugins.
- Try to replicate the issue with minimal steps.
- Then let me know the steps to replicate it.

Thanks for your co-operation.

Honda Accord 2021 – Qwerty-group 2024-10-28 14-59-12.png
October 28, 2024 at 9:00 am #16336542

oleksiiB-3

I cannot activate the theme because they strictly allow one key per domain, and if I deactivate it on the main site, many things will be lost.

Anyway, i will try to explain what i did.

A new block with contacts was created in Elementor, and elements like the form title are also from a field plugin in Elementor

new changes.png
October 29, 2024 at 2:48 am #16340053

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I'm asking my compatibility team to get the theme key and try to replicate the issue on the sandbox site. I will update you here when I have something to share.

Thanks.

October 29, 2024 at 8:46 am #16340754

oleksiiB-3

Hi,

I also wrote them an email regarding a key for the test domain. This demo has been imported, and on the car page, the plugin doesn’t recognize not only the newly created blocks but also the original ones from the theme, such as the title.

this demo.png
October 29, 2024 at 10:31 am #16341381

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I'm discussing this issue with our 2nd tier support and I will update you here when I have something to share.

Thanks.

November 14, 2024 at 2:02 am #16400404

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I can show the translation of Classic listing template in the frontend with the following steps:

1. Edit the file /wp-content/motors-car-dealership-classified-listings/includes/class/Features/Elementor/Nuxy/TemplateManager.php

2. Around line 335, replace the code

public static function motors_display_template() {
	global $post;
	$special_listing_template = get_post_meta( $post->ID, 'special_listing_template', true );
	$template_listing_id     = ( $special_listing_template ) ? $special_listing_template : self::$selected_template_id;
	$template_listing         = get_post( $template_listing_id );
	setup_postdata( $template_listing );
	//phpcs:ignore
	echo Plugin::instance()->frontend->get_builder_content_for_display( $template_listing->ID );
	wp_reset_postdata();
}

with the workaround code

public static function motors_display_template() {
	global $post;
    $special_listing_template = get_post_meta($post->ID, 'special_listing_template', true);
    $template_listing_id = ($special_listing_template) ? $special_listing_template : self::$selected_template_id;
	// Workaround for WPML compsupp-7673
    $translated_template_listing_id = apply_filters('wpml_object_id', $template_listing_id, 'listing_template', true);
    $template_listing = get_post($translated_template_listing_id);
    setup_postdata($template_listing);
	//phpcs:ignore
	echo Plugin::instance()->frontend->get_builder_content_for_display( $template_listing->ID );
	wp_reset_postdata();
}

Looking forward to your reply.
Thanks

Nissan GTR – Qwerty-group 2024-11-14 08-56-02.png

The topic ‘[Closed] Motors’ is closed to new replies.