Customizations: 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.

Please note: 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 step:

  • Create 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.
  • Copy the all.php file from the <testrail>/app/i18n/translations/ directory to the newly created custom directory
  • 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.
  • 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 enter this:
<?php
 
$languages['de'] = 'German';
  • 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 also translate the additional system messages, follow these steps:

  • Create a new directory under the <testrail>/sys/i18n/translations directory, e.g. de.
  • Copy all existing files under the <testrail>/sys/i18n/translations/en directory to the newly created directory
  • Open and edit the files you've just copied to translate the system texts