🌍 Since CodeceptJS 2.4.2 you can use translation for Scenario, Before, and other keywords within your tests. Please help us to update language definition files to include the best translation for your language!

# Translation

Test output and the way tests are written can be localized. This way scenarios can be written in almost native language using UTF support of JavaScript. If you have non-English team and you work on non-English project consider enabling translation by setting translation to one of available languages (opens new window).

Please refer to translated steps inside translation files and send Pull Requests to add missing.

To get autocompletion for localized method names generate definitions by running

npx codeceptjs def

# Russian

Add to config:

  "translation": "ru-RU"

when running with --steps option steps output will be translated:


This also enables localized method names for actor object.

This way tests can be written in native language while it is still JavaScript:

Сценарий('пробую написать реферат', (Я) => {
    Я.вижу("Написать реферат по");
    Я.кликаю("Написать реферат");
    Я.вижу("Реферат по психологии");

# Portuguese

To write your tests in portuguese you can enable the portuguese translation in config file like:

  "translation": "pt-BR"

Now you can write test like this:

Scenario('Efetuar login', ({ Eu }) => {
    Eu.preenchoOCampo("login", "[email protected]");
    Eu.preenchoOCampo("senha", "123456");
    Eu.vejo("Seja bem vindo usuário!");

# French

To write your tests in French you can enable the French translation by adding to config:

  "translation": "fr-FR"

Now you can write tests like this:

Scenario('Se connecter sur GitHub', (Je) => {
    Je.remplisLeChamp("Username or email address", "jean-dupond");
    Je.remplisLeChamp("Password", "*********");
    Je.cliqueSur("Sign in");
    Je.vois("Learn Git and GitHub without any code!");

# Italian

Add to config

  "translation": "it-IT"

Now you can write test like this:

Caratteristica('Effettuare il Login su GitHub', (io) => {
    io.compilo_il_campo("Username or email address", "giuseppe-santoro");
    io.compilo_il_campo("Password", "*********");
    io.faccio_click_su("Sign in");
    io.vedo("Learn Git and GitHub without any code!");

# Polish

Add to config

  "translation": "pl-PL"

Now you can write test like this:

Scenario('Zakładanie konta free trial na stronie głównej GetResponse', ({ Ja }) => {
    Ja.wypełniam_pole("Email address", "[email protected]");
    Ja.wypełniam_pole("Password", "digital-marketing-systems");
    Ja.klikam('Sign up');

# Chinese

Add to config:

  "translation": "zh-CN"


  "translation": "zh-TW"

This way tests can be written in Chinese language while it is still JavaScript:

Feature('CodeceptJS 演示');

Scenario('成功提交表单', ({}) => {.在页面('/documentation').填写字段('电邮', '[email protected]').填写字段('密码', '123456').勾选选项('激活').勾选选项('男');.单击('创建用户').看到('用户名可用').在当前网址中看不到('/documentation')


Feature('CodeceptJS 演示');

Scenario('成功提交表單', ({}) => {.在頁面('/documentation').填寫欄位('電郵', '[email protected]').填寫欄位('密碼', '123456').勾選選項('活化').勾選選項('男');.單擊('建立用戶').看到('用戶名可用').在當前網址中看不到('/documentation')

# Japanese

Add to config

  "translation": "ja-JP"

Now you can write test like this:

Scenario('ログインできる', ({ 私は }) => {
    私は.フィールドに入力する("Eメール", "[email protected]");
    私は.フィールドに入力する("パスワード", "[email protected]");

# Using your own translation file

Create translation file like this:

module.exports = {
  I: '',
  contexts: {
    Feature: 'Feature',
    Scenario: 'Szenario',
    Before: 'Vor',
    After: 'Nach',
    BeforeSuite: 'vor_der_suite',
    AfterSuite: 'nach_der_suite',
  actions: {
    click: 'Klicken',
    wait: 'Wartenn',

And add the file path to your config

    "translation": "./path/to/your/translation.js"
Last Updated: 9/30/2020, 3:49:15 PM