Download PDF in the email confirmation, with PDF template translated with WPML

Gravity Forms Bug Released
17 August, 2025 11:23:26
gruptemple
Topics: 8
Messages: 19
Hi team,

I have a PDF template to download a PDF in different languages. In the PDF template, I have a separate page for each language. Following your previous instructions, I added an action in the page options for each page in the template to specify a different language for each sheet, like this:

Page(1) Options:
- Hide page - If: 1 = 1
- Show page - If: [e2pdf-arg key="arg1"] = esp

Page(2) Options:
- Hide page - If: 1 = 1
- Show page - If: [e2pdf-arg key="arg1"] = eng

In the Gravity Forms confirmation and notification message (I use WPML to translate forms, confirmations, and notifications), I apply the following code for the PDF download:
For example, if the user has used the URL for the Spanish language in Gravity Forms, I use the following code for the confirmation:
[e2pdf-download id="1" arg1="esp" button-title="document name"]

For example, if the user has used the URL for the English language in Gravity Forms forms, for confirmation I use the following code (changed in the WPML translation strings):
[e2pdf-download id="1" arg1="eng" button-title="document name"]

All of this works correctly.

My question is the following:

Now, since version 1.30.0, which adds support for WPML, if I use WPML to translate PDF templates and don't create an additional page in the template for each language, is there a way to download the template in the language the user used to fill out the Gravity Forms form, other than the one presented above? That is, without using the arguments [e2pdf-arg key="arg1"] = esp or [e2pdf-arg key="arg1"] = eng in the PDF template's page options and consequently in the download link code [e2pdf-download id="1" button-title="document name"]?

Thanks!!
17 August, 2025 23:16:26
E2Pdf
Support
Topics: 7
Messages: 3522
Hello,

Yes, the latest RC version 1.30.x includes beta full integration with WPML. It allows translation of elements created in the E2Pdf Template via String Translation. This means that if it’s not a pre-uploaded E2Pdf Template, it can work with a "single" E2Pdf Template without requiring you to define the language.

To use WPML in E2Pdf, you need to:

1. Update the plugin to the latest RC version: 1.30.x

2. Make sure that the URLs after form submission are generated with the correct "lang" prefix. If not, switch the "URL Format" in the "E2Pdf" → "Settings"

3. Set the full translation in "E2Pdf" → "Settings" → "Translation".

4. Re-save the E2Pdf Template that should be translated.

5. After saving the E2Pdf Template, the strings should appear in WPML String Translation.
We would really appreciate your feedback at WordPress.org!
18 August, 2025 08:25:03
gruptemple
Topics: 8
Messages: 19
Many thanks for the quick response.
It works fine.
There is only one thing.
The original pdf template must be built in English, to be able to later translate it into the different languages.
If you build the template in any other language, after WPML, it always detects it in English.
Can this be changed so that WPML detects the pdf template in the original language it was built in?
18 August, 2025 08:27:53
E2Pdf
Support
Topics: 7
Messages: 3522
Could you please clarify what the default language is set to in WPML?
We would really appreciate your feedback at WordPress.org!
18 August, 2025 08:50:06
E2Pdf
Support
Topics: 7
Messages: 3522
It seems we were able to replicate the issue on our side. We expect an update to be released tomorrow, and the fix will likely be included in that release. In the meantime, you should be able to change the language by going to String Translation, selecting the desired strings, and using the WPML String Translation interface to change the default language.
We would really appreciate your feedback at WordPress.org!
18 August, 2025 09:20:39
gruptemple
Topics: 8
Messages: 19
Thanks for the quick response!
Yes, I have already tried this last option and yes, it is a temporary solution.
I am waiting for your correction to try.
Thanks a lot!
19 August, 2025 00:49:20
E2Pdf
Support
Topics: 7
Messages: 3522
Hello,

We’ve just released an update to the RC version 1.30.04, which should now correctly save strings with the default language set. Please let us know if you encounter any issues after updating.

P.S. Please keep in mind that if strings have already been saved under WPML, they will need to be removed before re-saving the E2Pdf Template so that new strings can be added.
We would really appreciate your feedback at WordPress.org!