Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
How To Guide Artwork

IN 4 SIMPLE STEPS: translate Gravity PDF strings into different languages using Loco Translate Plugin

Discover an easy way to translate your PDF’s strings into your set WordPress language, with the help of Loco Translate Plugin

So, what’s the problem?

Your native language isn’t English, you’ve adjusted your WordPress Site Language and now your admin area gets automatically translated. You’ve got Gravity PDF installed and you’re using one of the Core or Universal templates to generate your PDFs. Your Product fields are grouped together in a nice table at the end of the document, but for reasons unknown to you, the column labels are still in English! Why won’t it just work,” you frustratingly think to yourself. “The rest of my admin area is being translated. Why won’t this?” 

The short answer to that question is we’d love more volunteers to help us translate the free (and full-featured) version of Gravity PDF into more language so it will “just work” for you – to those amazing people who’ve already contributed: we thank you! While that’s a long term solution, it doesn’t solve your immediate problem, and that’s what this article is all about. 

With the help of another free plugin called Loco Translate, you’re just four steps away from being a pro string translator. Vamonos (let’s go)! 👇

Step 1: Install Loco Translate Plugin

Navigate to your Plugins page, search for Loco Translate, and click Install Now. Once installed, activate the plugin.Install Loco Translate GIF(You can also download the plugin from their WordPress.org plugins page).

Step 2: Add a New Language

Click on the newly added Loco Translate admin menu item (on the left under your “Settings” menu).Check Site Language GIF

You can see our example site is set to French. Yours will likely differ and you should tweak the instructions to suit.

Further down the page under the Running Plugin (“Extensions actives” in our example) heading locate and select the Gravity PDF bundle with the text domain gravity-forms-pdf-extended.Add new language GIF

When the page reloads, click on ⨁ New language (⨁ Nouvelle langue in French in our example).

Now it’s time to 1. Choose a Language (Choisissez une langue). Click the drop down under the WordPress language (Langue de WordPress) option and select your Site Language.Choose a location GIF

You’ll then need to 2. Choose a location for the translation file. Steer clear of the Author (Auteur) option as it stores the translations in the plugin directory and it will be overridden when you update Gravity PDF. We’re going to use the default System (Systéme) location instead.

After you’ve made a selection, click on Start translating (“Commencer la traduction” in this example), and you will be taken to the Editor page.Editor Page Image

Step 3: Filter and Translate Strings

Before you do the actual translations, you should make a list of all the strings you want to update. For this guide we’re going to be translating the Subtotal and Shipping strings from the Product table.Sample PDF Screenshot Image

Let’s start with Subtotal. Use the Loco Translate Editor search feature to filter the strings and select it in the Text Source box (or in our case Texte source in French).Translate Subtotal String GIF

You’ll notice below the string selection box are two additional boxes. The first shows you the untranslated source text, and the second is where you enter the translated text. In the translation box (the third one) we’re going to enter Sous-total.

Next, we’ll search for the Shipping string. When you locate it you’ll notice that the string includes a placeholder character “%s”. These placeholder characters get dynamically replaced by Gravity PDF at runtime and will be important to keep in your translated version. In the translation box we’ll enter “Livraison (%s)”.
Translate Shipping (%s) String GIF

Once you’re happy with the translations click the Register button (in our example it’s the big blue translated Enregistrer button).

Repeat this process for any other strings you need translated.

Step 4: Check your PDF

Now that you’ve completed your translations, let’s check out the PDF. Head to the appropriate Gravity Forms Entry List page and select the “View PDF” link on one of your entries.Translated Strings Screenshot ImageAs you can see, the PDF is correctly displaying the translated strings. Voilà!🧐

Wrapping Up

This technique works for any language, in any plugin or theme, and isn’t limited to PDF translations. You don’t even need to translate the text. If you aren’t happy with the current text displayed you can change it to something else in the same language. 

Now that you’ve conquered string translation, go forth and translate all the things!"Translate all the strings!" Meme

Did you like this guide?
To learn more about the different features of Gravity PDF, subscribe to our newsletter!

Published by Dan Tabifranca

Dan Tabifranca is a marketer, writer, and designer for Gravity PDF.

Signup for the latest Gravity PDF news, tips and updates

  • This field is for validation purposes and should be left unchanged.
Scroll To Top

Choose your currency:

Close
Converted prices are for reference only - all orders are charged in $ Australian Dollars ($) AUD.
  • AUDAustralian Dollars ($)
  • USDUS Dollars ($)
  • CADCanadian Dollars ($)
  • EUREuros (€)
  • GBPPound Sterling (£)
  • NZDNew Zealand Dollar ($)
  • JPYJapanese Yen (¥)