Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 27 replies, has 4 voices.

Last updated by Alejandro 1 month, 4 weeks ago.

Assigned support staff: Alejandro.

Author Posts
September 11, 2019 at 12:14 pm #4553295

davidP-23

I have the exact same issue for a website we need to publish as soon as possible. Could you make sure to post the solution here publicly as soon as it is available? Thank you!

September 12, 2019 at 5:34 am #4558421

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Plase change the code i gave you with this one instead (always in the functions.php file)

add_action('init', function (){
	add_filter( 'wpml_elementor_widgets_to_translate', 'eael_elementor_wpml' );
});

function eael_elementor_wpml($widgets) {
	$widgets['eael-data-table'] = array(
		'conditions' => array('widgetType' => 'eael-data-table'),
		'fields' => array(),
		'integration-class' => array(
			'Data_Table_Header',
			'Data_Table_Content'
		)
	);

	return $widgets;
}


class Data_Table_Header extends WPML_Elementor_Module_With_Items {
	/**
	 * @return string
	 */
	public function get_items_field() {
		return 'eael_data_table_header_cols_data';
	}

	/**
	 * @return array
	 */
	public function get_fields() {
		return array( 'eael_data_table_header_col' );
	}

	/**
	 * @param string $field
	 *
	 * @return string
	 */
	protected function get_title( $field ) {
		return esc_html__( 'Column Name', 'essential-addons-elementor' );
	}

	/**
	 * @param string $field
	 *
	 * @return string
	 */
	protected function get_editor_type( $field ) {
		return 'LINE';
	}
}

class Data_Table_Content extends WPML_Elementor_Module_With_Items{

	public function get_items_field() {
		return 'eael_data_table_content_rows';
	}


	public function get_fields() {
		return array(
			'eael_data_table_content_row_title',
			'eael_data_table_content_row_content',
			'eael_data_table_content_row_title_link'
		);
	}

	protected function get_title( $field ) {
		switch($field) {
			case 'eael_data_table_content_row_content':
			case 'eael_data_table_content_row_title':
				return __( 'Cell Text', 'essential-addons-elementor' );

			case 'eael_data_table_content_row_title_link':
				return __( 'Link', 'essential-addons-elementor' );

			default:
				return '';
		}
	}

	protected function get_editor_type( $field ) {
		switch($field) {
			case 'eael_data_table_content_row_title':
				return 'AREA';

			case 'eael_data_table_content_row_content':
				return 'VISUAL';

			case 'eael_data_table_content_row_title_link':
				return 'LINK';

			default:
				return '';
		}
	}
}

you can check it out on this sandbox site: hidden link

September 12, 2019 at 7:02 am #4558711

ilkaB

Hi Alejandro, do you have an update here please?

September 12, 2019 at 7:02 am #4558715

ilkaB

Sorry, I did not see your update. I will test the new code.

September 12, 2019 at 7:07 am #4558719

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

I suppose i arrived with great timing, hehe.
Test it out and let me know how it goes.

September 12, 2019 at 7:07 am #4558729

ilkaB

Hi Alejandro,

I can see the text from the tables now. Give me a couple of days to test it please.

Kind regards
ilkaB

September 12, 2019 at 7:53 am #4559025
davidP-23

It worked for me, thank you!

I have two minor issues though:

1. I get this PHP error when I translate for the first time: Warning: trim() expects parameter 1 to be string, array given in /home/wingtra1/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-wpml-pb-string-registration.php on line 92 (see screenshot)

2. The rows "Content" which are empty cells and shouldn't be translated are appearing too, nothing bad, but might be confusing for the translators. (see screenshots)

New threads created by Alejandro and linked to this one are listed below:

https://wpml.org/forums/topic/split-wpml-does-not-let-me-translate-elementor-table-widget/

September 12, 2019 at 1:55 pm #4561469

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

I also noticed that and wanted to ask you about it. in theory, as you said, that is not a bug, but could you please explain to me what is the purpose of those elements? because it's weird that you can write to them but they are not visible.

Please help me understand so i can try to modify the code and leave those elements out of the translation editor.

Thanks in advance.

September 14, 2019 at 6:35 am #4572303

ilkaB

Hi Alejandro,

the entries "row content" are used as an identifier. Each "row" contains X columns and in the columns the content is placed and that needs to be translated.
The only "row" that also needs translation is the table topic which is basically also a row.
Rows do not have content, only css.
If a row has content is has a minimum of one column inside and thats the one which needs to be translated.

So as davidP-23 says, the rows can be removed from the code.

September 14, 2019 at 6:39 am #4572305

ilkaB

One more question. Will the code that we now need to implement in our functions.php or our style be part of a next WPML update so that the manual file editing is not needed anymore?
I mean after we confirmed it works?

September 16, 2019 at 10:29 am #4578801

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

1) About the code in functions.php file
It all depends on how the author of this plugin wants to proceed. if he joins the go global program, then they will probably add the code into their new versions of the plugin.

if not, then we will decide if adding it to our repository (if we can, of course) or if we should behave in a different way. Having the code there won't do you harm at all, because it actually just makes sure the code is there and if the code is different in the future it will just won't work anymor but it won't crash your site or anything.

2)about the removal of the content row items on the translation editor:
I'm asking our developer to check what could be done to avoid this row issue, because right now all those content seem to be behaving in the exact way so it's a bit difficult to filter them.

I'll update you once i have more information on this.

September 20, 2019 at 2:36 pm #4613021

ilkaB

Hi Alejandro,

I confirm the code works. After testing and playing around I do not see a negative impact atm.
Would be nice to see this in an future WPML update.
I hope the author of the WP Essential Addons pack is willed to work with you in future so that more if his/her widgets will work with WPML.

Thanks for your excellent and nice support!

September 24, 2019 at 8:11 am #4628973

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Oh i'm glad to hear that.

I also tried to remove the row content, but in the code it seems there aren't differences between row content and column content, so i couldn't do it, unfortunately.

We are actually contacting the user about this as well as making their plugin compatible, and it would be very good if you invited them to join our go global plan https://wpml.org/documentation/theme-compatibility/go-global-program/ (most of the time they are more willing to do so when users ask them).

It's free and it will help us keep in touch with them when we have new updated code that could potentially break the compatibility between our plugins (and of course the same thing goes to them, they will be able to let us know if they also have new code that could break the compatibility).

In the meantime i'll close the ticket but don't hesitate to open a new ticket if you encounter a different issue regarding WPML, we will gladly help you out!