All Collections
Beta Features
🌏Translations: Translate or localize Pathwright's learner interface
🌏Translations: Translate or localize Pathwright's learner interface

This article will help you get up and running whether you need Pathwright translated or simply want to re-word a text label.

David Chapman avatar
Written by David Chapman
Updated over a week ago

For admins

Currently, Pathwright supports a single language for the user interface per account. We hope in the future to allow each user to customize the interface to their language (if available). 

This feature is currently in beta testing. Admins may apply for the beta.

Here's what the beta includes:

  • The ability to translate the learner-facing interface into nearly any language. Some of the admin-facing interface is not translatable (English only).

  • Automated email notifications are not translatable at this time and can't be disabled. However, you can add custom messages to manual messages and you can also automate fully translated emails via Zapier.

  • One language per account. So if you wanted to have both an English and a Spanish interface, for example, this would require two separate accounts at this stage.

We maintain a Spanish translation. We have the following client-contributed translations available, but they may be incomplete:

  • Arabic

  • Chinese

  • French

  • German

  • Hindi

  • Polish

  • Portuguese

  • Swedish

  • Tamil

  • Thai

  • Turkish

  • Ukrainian

Right-to-left languages are not fully supported yet. You're welcome to use a right-to-left language with the understanding that some placements will be off (period placement, for example).

If you're interested in customizing or contributing a translation rather than using an existing translation, you'll need to have someone with expertise in JSON who can independently apply changes, test them, and upload the translation files. See the instructions below.


How to edit and upload your translation file

Once you have applied for the beta and a Pathwright Guide has enabled the translation features for you, you will be able to manage your translations from your Account Settings.

Step 1: Download the main (English) translation file

Go to Settings > Add account information > Update translation > Download the main (English) translation file and download the file (in JSON format) which contains all translate-able user interface labels in your target language. You will be making changes to this file.

Note: Any value within double brackets should be unchanged when translating.


The original language file will look something like this.

💡 If you are translating into a language that Pathwright does not yet have, you can take advantage of this free tool in order to machine-translate all the English labels. From there, you can modify translations as needed.

Step 2: Use our translation tool to help you locate terms in the language file

We know it can be a little tricky to locate a label you'd like to translate or modify inside of a large JSON file, so we've created a simple translation toggle tool that when active will replace labels with the path to that label inside of the translation files.

A translation path may look like this: nav.navbar.menu. This would mean that you can find that particular label in the JSON language file by looking for the "nav" key, then the "navbar" key under that, and then the "menu" key under that.

The translation toggle tool in action.

In order to use the tool, you must first enable it, which you can do in your school's Settings > Add account information > Update translation > Toggle translation keys.

Note that the tool will remain visible even if you log out, which will allow you to view Pathwright as a visitor or learner. However, it will disappear if you close your browser tab/window.

Please keep in mind that this tool is simply intended as a help and may not perform optimally in all views. Here are a few tips:

  • We recommend using Chrome on a standard computer (vs. a tablet/phone)

  • If the paths are difficult to read, you can (in some cases) right-click on it and copy it into your clipboard.

  • If paths are not appearing, you can try (with the tool toggled on) refreshing your page.

Step 3: (Optional) Use a JSON editing tool to help you manage and change the language file.

Even with the label paths that the translation toggle tool provides you, we find it a bit tedious to edit the JSON file. We recommend you use this free tool: https://jsoneditoronline.org. Here's how:

Upload the master language file (described in Step 1).

Find the path to a label you want to translate using the toggle tool (step 2 above).

Use the path to navigate the labels in the right column, drilling down until you find the label you wish to translate.


Double-click the label, translate it, and then click the left arrow (in the area between the 2 columns) to apply the change to the JSON file (in the left column).

When finished, save the file (Click Save > Save to Disk from the top menu).

Step 4: Upload your translation file as a JSON file in your account settings.

To apply your translation to your account, go to Settings > Add account information > Update translation > Upload a new translation file.

To edit your existing JSON file, select Download your current translation file, edit the file, and upload it again.

💡Tip: if you get an error message when uploading your file, you'll need to correct any syntax errors in your JSON file and re-upload it. You may need to refresh the browser to clear the error message.


Notes

  • If you use a "find and replace" method for changing certain words, be sure that you don't change the original keys. For example, in: "author": "Author", the first word is the key, and must not be changed, as that is how Pathwright finds the label and applies it. Only change the second word, or the value, for example: "author": "Instructor".

  • When small updates are made, it can be helpful to send just the updated keys. When sending specific translated keys, you'll need to send the entire path.
    For example, this path is incomplete:
    "search_bar": { "placeholder": "Search classes..." }
    This is a complete path: "search": { "search_bar": { "placeholder": "Search classes..." } }

  • This type of label, t('discussion.label'), is a new way that we translate a common term (like discussion, cohort, etc.) and translate it in only one place. This will simplify the process if you ever want to go back later and change a term everywhere. These should remain unchanged, along with any words inside double braces.

Did this answer your question?