Languages: Translating TestRail’s user interface

TestRail has been built to support additional user interface translations and this article explains how to translate TestRail. Translating TestRail’s user interface can be useful if your team is more comfortable using another language than the built-in English user interface or if some of your customers or other stakeholders prefer using a translated application.

TestRail’s translation system can also be used to replace specific terminology or texts. As TestRail automatically falls back to the standard English texts, you would only need to update or override the texts and strings you would like to replace.

 

TestRail uses UTF-8 for all files, input and output, so make sure to encode all translation files in UTF-8. This is especially important if you are using non-western characters. Please make sure to choose UTF-8 without BOM to encode your files.

Steps to translate TestRail

To create a custom translation for TestRail, follow these steps:

  1. Create a new directory under your <testrail>/app/i18n/translations/ directory. We will create a German translation in this example, so we create a new directory called de.
  2. Copy the all.php file from the <testrail>/app/i18n/translations/en/ directory to the newly created custom directory
  3. Open the copied all.php file and translate all texts and strings. Please note that TestRail will automatically use the default English text or string if it cannot find a value in your custom translation file. So if you only want to translate (or replace) specific parts of TestRail, simply delete all values in your custom all.php file that you don’t want to translate. This behavior is also useful for TestRail updates, as TestRail will automatically fall back to the English texts for new not-yet translated items.
  4. We now need to register the new language so that TestRail can find it. To do this, edit or create a new file called languages.php in the <testrail>/custom/config directory (you might also need to create this directory). Now register the new language like by opening the file in a text editor and entering this:
    <?php
    $languages['de'] = 'German';
  5. The last step would be to select the new language as the default language for your installation under Administration > Site Settings. Alternatively, users can also select the new language under My Settings or you can change the language for users under Administration > Users & Roles.

Translating the system texts

Besides the strings and texts for TestRail itself, you can also translate generic texts and messages of TestRail’s system framework (called Gizmo). To translate the additional system messages as well, follow these steps:

  1. Create a new directory under your <testrail>/sys/i18n/translations/ directory using the same translation identifier as before (de in our example).
  2. Copy the files from the <testrail>/sys/i18n/translations/en/ directory to the newly created custom directory
  3. Open and edit the file you’ve just copied to translate the system texts

 

TestRail with version 4.0 and later now only uses a single, combined translation file for system texts (sys.php). If you created a custom translation for system messages with an earlier TestRail version, you may need to change your custom translation accordingly.

  Contributing

If you have completed a translation of TestRail and would like to share this with other users, you can contribute this to our public TestRail Customizations GitHub repository here.

Was this article helpful?
1 out of 3 found this helpful