Save Results Pro

TranslatePress plugin compatibility

Published: February 8, 2025
Support status: comment

Hello, I am using TranslatePress plugin to translate the site in three languages. The plugin also translates emails. Works fine. The issue is – when I switch the language the Quiz reloads and empties all entries for the new language.
As far as I understand, the issue occurs because TranslatePress reloads the entire page when switching languages. Is there any way to save the entires in real time, so that translation works and entries are saved?

thread author: Marina

Hi Marina,
I’ll have to look into TranslatePress to see if there are any workarounds.

08 February 2025 — 10:10 support admin - Dylan

UPDATE:

First, a quick explainer of the actual issue here. Both HD Quiz and the Save Results Pro addon are translatable. I use the correct methods and strings to allow things like table headings, settings, etc to all be translatable into any language. But that is not the problem.

The problem is that WordPress doesn’t have a way to translate user generated content in things like theme or plugin settings. You can translate any text that is “static”, but if you have dynamic content, there simply are no good solutions.

HOWEVER, I’ve spent the past few hours reading through the TranslatePress documentation and debugging their code. Being able to get the data I’d need is a long shot since almost every plugin created by teams like that, frankly, have terrible code and structure, and are actively hostile to getting open data. But TranslatePress is not one of these plugins! In fact, they have pretty simple functions built-in, allowing me to integrate the SRP plugin with them pretty well.

I am still in the testing phase, but so far results look very promising. As long as I do not encounter any bugs, the next version of the addon will

a) detect if you are using translatepress, and
b) automatically detect what languages you have added
c) automatically edit the settings page of SRP to add new fields specifically for those languages
d) when sending the email, check the current users selected language
e) update the email content depending on their language

So far, the only downside to this is that we can only detect the user’s language if they are logged in since translatepress only saves that data to a loggedin users profile.

08 February 2025 — 15:11 support admin - Dylan

Login to reply