Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues with the Real 3D Flip Book plugin showing English images instead of French on the French site, it might be due to the way translations are handled.
Solution:
Firstly, you should translate the FlipBooks using the WordPress Editor, as detailed here: Using different translation editors for different pages.
Ensure that the translated Flipbook is correctly set in the Elementor Widget options for the Flipbook. Each Flipbook has a unique shortcode in each language, which should be correctly assigned in the widget settings.

The author of the Real 3D FlipBook Plugin is informed and will work on a solution. For developers, adjustments can be made in the plugin files to ensure proper translation handling. In the file

\wp-content\plugins\real3d-flipbook-elementor-addon\widgets\real3d-flipbook.php

, modify the code as follows:

On line 308, replace:

$book_id = $settings['real3d_flipbook_id'];

with:

$book_id = isset($settings['real3d_flipbook_id']) ? $settings['real3d_flipbook_id'] : '';

		// WPML-aware: try to resolve a translated flipbook ID (fallback to post mapping)
		if ( ! empty( $book_id ) && ( class_exists('SitePress')) ) {
			$translated_id = apply_filters( 'wpml_object_id', (int) $book_id, 'real3dflipbook', true );
			if ( empty( $translated_id ) ) {
				$translated_id = apply_filters( 'wpml_object_id', (int) $book_id, 'post', true );
			}
			if ( ! empty( $translated_id ) ) {
				$book_id = $translated_id;
			}
		}

And on line 311, replace:

$book_lightboxthumbnail = !empty($settings['real3d_flipbook_lightboxthumbnail']['url']) ? $settings['real3d_flipbook_lightboxthumbnail']['url'] : '';

with:

$book_lightboxthumbnail = '';
			if ( ! empty( $settings['real3d_flipbook_lightboxthumbnail'] ) ) {
				$thumb = $settings['real3d_flipbook_lightboxthumbnail'];

				// Prefer attachment ID if available (Elementor provides ['id'] and ['url'])
				if ( ! empty( $thumb['id'] ) ) {
					$attachment_id = (int) $thumb['id'];

					// Use WPML to get translated attachment ID if available
					if ( class_exists('SitePress')) {
						$translated_id = apply_filters( 'wpml_object_id', $attachment_id, 'attachment', true );
					} else {
						$translated_id = $attachment_id;
					}

					// If we have a translated ID, get its URL
					if ( ! empty( $translated_id ) ) {
						$translated_url = wp_get_attachment_url( $translated_id );
						if ( $translated_url ) {
							$book_lightboxthumbnail = $translated_url;
						}
					}
				}

				// Fallback to the raw URL provided by Elementor if no attachment URL resolved
				if ( empty( $book_lightboxthumbnail ) && ! empty( $thumb['url'] ) ) {
					$book_lightboxthumbnail = $thumb['url'];
				}
			}

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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 32 replies, has 0 voices.

Last updated by sachaJ 3 weeks, 4 days ago.

Assisted by: Andreas W..

Author Posts
October 18, 2025 at 3:38 pm #17496045

sachaJ

I have contacted 3D FlipBook for other issues BUT as far as I am concerned, I am happy with loading the FR document into my FR pages.

I will consider this ticket concluded.

I am just waiting on my 3D FlipBook refund, which I believe they will grant me.

We both learned a lot within this ticket 🙂

October 18, 2025 at 10:51 pm #17496292

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

You will basically create one Flipbook per language, but you will need to use the WordPress Editor to create the translations, as the image and settings are not copied over.

Usually, in such a case, we would use the plugin's custom field settings and set the fields to "Copy", so that all settings are copied over when creating the translation, but this sadly is not working out as expected.

Now, we could try to find a way how me can make sure that all the images and settings are copied, and this way you would also use the WPML Translation Editor to translate the Flipbooks. If you are still interested in such an option, please let me know.

For the Flipbook Elementor Widget:

The author can achieve the translation of the widget's assigned Flipbook in each language and the Custom Thumbnails from WPML Media Translation by adjusting the file:

\wp-content\plugins\real3d-flipbook-elementor-addon\widgets\real3d-flipbook.php

On line 308 replace:

                $book_id = $settings['real3d_flipbook_id'];

with:

$book_id = isset($settings['real3d_flipbook_id']) ? $settings['real3d_flipbook_id'] : '';

		// WPML-aware: try to resolve a translated flipbook ID (fallback to post mapping)
		if ( ! empty( $book_id ) && ( class_exists('SitePress')) ) {
			$translated_id = apply_filters( 'wpml_object_id', (int) $book_id, 'real3dflipbook', true );
			if ( empty( $translated_id ) ) {
				$translated_id = apply_filters( 'wpml_object_id', (int) $book_id, 'post', true );
			}
			if ( ! empty( $translated_id ) ) {
				$book_id = $translated_id;
			}
		}

And on line 311 replace this line:

$book_lightboxthumbnail = !empty($settings['real3d_flipbook_lightboxthumbnail']['url']) ? $settings['real3d_flipbook_lightboxthumbnail']['url'] : '';

with

$book_lightboxthumbnail = '';
			if ( ! empty( $settings['real3d_flipbook_lightboxthumbnail'] ) ) {
				$thumb = $settings['real3d_flipbook_lightboxthumbnail'];

				// Prefer attachment ID if available (Elementor provides ['id'] and ['url'])
				if ( ! empty( $thumb['id'] ) ) {
					$attachment_id = (int) $thumb['id'];

					// Use WPML to get translated attachment ID if available
					if ( class_exists('SitePress')) {
						$translated_id = apply_filters( 'wpml_object_id', $attachment_id, 'attachment', true );
					} else {
						$translated_id = $attachment_id;
					}

					// If we have a translated ID, get its URL
					if ( ! empty( $translated_id ) ) {
						$translated_url = wp_get_attachment_url( $translated_id );
						if ( $translated_url ) {
							$book_lightboxthumbnail = $translated_url;
						}
					}
				}

				// Fallback to the raw URL provided by Elementor if no attachment URL resolved
				if ( empty( $book_lightboxthumbnail ) && ! empty( $thumb['url'] ) ) {
					$book_lightboxthumbnail = $thumb['url'];
				}
			}

If the author is interested in solving the issue, please share my findings. In case you do not need further assistance, please mark this ticket as resolved.

October 22, 2025 at 4:08 pm #17509112

sachaJ

Thank you Andreas!

I will close the ticket now 🙂