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.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by caterinag-2 1 year, 9 months ago.

Assisted by: Dražen Duvnjak.

Author Posts
February 27, 2023 at 12:43 pm #13124465

caterinag-2

Hi Drazen
it's there,
It was set to ITA originally.
I set to ITA again (changed to ENG and back to ITA)
it has been translated to ENG
But doesn't work

February 27, 2023 at 12:47 pm #13124483

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

as said in the original ticket I have opened a new one for this case.

It seems the translation is showing in front only when the "Look for string while page is rendered" option from the bottom of the WPML String translation page is enabled.

That should not be the case, and probably something is causing the translation to be saved/loaded correctly.

In order to check further I would need to check in minimal, which would mean disabling all other plugins and switching themes.

Is it possible for you to provide a staging site for us to check? If not let me know and I will provide a different approach.

Thanks,
Drazen

February 27, 2023 at 2:54 pm #13125865

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

great, thanks. Let me know when ready.

Yes, now that you mention it could be related, as WPML String translation needs to be able to save these translations and load from the wp-content folder. Which seems to not happen for this last string.

If you can please check if the related folders and subfolders translations do not have the same issue or restricted writing/reading capabilities?

Regards,
Drazen

February 28, 2023 at 11:02 am #13134173

caterinag-2

Hi Drazen, staging site is on.
wp-content permisison is set to 755, same as wpml-string-translation and subfolders

February 28, 2023 at 12:26 pm #13135247

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks, I checked and in the end managed to work it correctly.

These are the steps I did, please try them on production also:

- Delete current related Italian string from WPML string translation > text domain event-tickets-wpml
- In your Italian reoccurring event add Ticket texts in the English language
- Visit the front end
- Go to WPML String translation and add Italian translation.

Seems to work and shows fine in the frontend in that order.

Please check and let me know.

Regards,
Drazen

February 28, 2023 at 1:37 pm #13136061

caterinag-2

Hi Drazen
I did, ENG is now perfect but ITA pages have ENG text instead....
hidden link
hidden link

February 28, 2023 at 3:11 pm #13137121

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back and for your patience.

I am checking and consulting on this with our 2nd tier, I will update you soon.

Regards,
Drazen

March 6, 2023 at 7:24 am #13175657

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for your patience.

Can you please add the next code instead the old one I suggested, then add your tickets text, visit frontend, and translate? It should work fine.

Steps:

- Open this .../wp-content/plugins/events-manager/templates/forms/bookingform/tickets-list.php

Look for line 33

Before this line:

-

<td class="em-bookings-ticket-table-type"><?php echo wp_kses_data($EM_Ticket->ticket_name); ?><?php if(!empty($EM_Ticket->ticket_description)) :?><br><span class="ticket-desc"><?php echo wp_kses($EM_Ticket->ticket_description,$allowedposttags); ?></span><?php endif; ?></td>

Add this code:

-

<?php
							$max_length = 50;
							$name = 'Event tickets - ' . $EM_Ticket->ticket_description;
							if (strlen($name) > $max_length) {
								$name = substr($name, 0, $max_length);
							}
							do_action('wpml_register_single_string', 'event-tickets-wpml', 'Event tickets - ' . $EM_Ticket->ticket_name, $EM_Ticket->ticket_name);
							$EM_Ticket->ticket_name = apply_filters('wpml_translate_single_string', $EM_Ticket->ticket_name, 'event-tickets-wpml', 'Event tickets - ' . $EM_Ticket->ticket_name);
							do_action('wpml_register_single_string', 'event-tickets-wpml', $name, $EM_Ticket->ticket_description);
							$EM_Ticket->ticket_description = apply_filters('wpml_translate_single_string', $EM_Ticket->ticket_description, 'event-tickets-wpml', $name);
							?>

- Visit an event in front-end.
- Translate the strings under event-tickets-wpml domain.

Kind regards,
Drazen

March 6, 2023 at 10:07 am #13177195

caterinag-2

LOVE YOU GUYS.
it seems working now.thank you very very much