For the complete documentation index, see llms.txt. This page is also available as Markdown.

Testing and Troubleshooting PDF Translation

Use this topic to check a dynamic PDF Translation setup and resolve common issues. The steps apply to both Hosted File and Resource-based PDF Translation unless noted.

Testing a Translation

  1. Confirm the form's PDF Translation Method and its settings are saved.

  2. Submit the form, or open an existing submission.

  3. Download the submission as a PDF.

  4. Add the language parameter to the download URL with a language code from your translations, then reload. For example:

https://yourproject.form.io/yourform/submission/[SUBMISSION_ID]/download?language=es

If the download URL already contains a query string, such as ?token=, add the parameter with & instead:

https://yourproject.form.io/yourform/submission/[SUBMISSION_ID]/download?token=TOKEN&language=es
  1. Check that the form text is translated. Only text that exactly matches a translation key is translated.

To test the language saved with a submission, submit the form while it's rendered in a specific language, then download the PDF without the language parameter. The PDF should use the same language.

Method-Specific Checks

URL-based:

  • Open the Translations URL in a browser and confirm it returns valid JSON with the language codes you expect.

  • To test a different file without changing the form settings, add the translationsUrl query parameter to the download URL.

Resource-based:

  • Open the Language resource and confirm it has a submission for the language code you're testing.

  • Confirm the value in Language Code matches the language parameter exactly, for example es, not Español.

Troubleshooting

All Methods

Symptom
Likely cause
Resolution

PDF is in the original language

No language was selected, or the translation settings weren't saved

Add language to the download URL, or confirm the submission was made in a translated form. Check that the form settings were saved.

Some text is translated, but not all

The untranslated text doesn't exactly match a translation key

Compare the keys with the form text, including capitalization, spacing, and punctuation.

Submitted values aren't translated

Submission data is out of scope

This is expected. Only form-defined text is translated.

PDF is in the wrong language

The submission's saved language is being used

Add language to the download URL to override the saved language.

Translations come from the wrong source

PDF Translation Method is set to the other method

Check PDF Translation Method in the form's PDF Settings and save.

Hosted File PDF Translation

Symptom
Likely cause
Resolution

PDF is in the original language for every language

The Translations URL isn't saved, or the endpoint can't be reached

Check the form's Translations URL (or the global setting) and confirm the endpoint is reachable.

PDF is in the original language for one language only

The language code isn't in the translations file

Add the language code as a top-level key in the file, or correct the code in the download URL.

PDF download fails or returns an error

The endpoint is unavailable or returns invalid content

Confirm the endpoint returns valid JSON with a Content-Type of application/json.

The global Translations URL is ignored

The form has its own Translations URL, or the API Server is earlier than 9.8.4

Clear the form's Translations URL to use the global setting, or upgrade the API Server.

Resource-based PDF Translation

Symptom
Likely cause
Resolution

PDF is in the original language for every language

No resource is selected, or the wrong components are selected

Check the form's PDF Settings. Confirm that Language Code Component and Translation Map Component point to the right components.

PDF is in the original language for one language only

The resource has no submission for that language code

Create a submission for the language, or check that the code in the download URL matches the value saved in the resource.

A component isn't listed in Language Code Component or Translation Map Component

The component is nested inside a layout component

Move the component to the top level of the Language resource.

Last updated

Was this helpful?