Skillversitas

Supported Languages

Gherkin was designed so feature files can be written in the language of the business. Behave ships the Gherkin dialect for dozens of languages: the keywords (Feature, Scenario, Given, When, Then, ...) are translated, while the structure stays identical. Step definitions in Python do not change at all; only the feature file's keywords differ.

Listing Languages

behave --list-languages

The output lists every supported language with its ISO code and native name: English, German, French, Spanish, Indonesian, Japanese, and many more. Pick the two-letter code for the option below.

Running in Another Language

Set the language per run with -l / --language, or persist it in behave.ini:

behave -l de features/
behave -l id features/

Feature File in Indonesian

Here is the classic cucumber example in Bahasa Indonesia. The same @step patterns from an English suite match it unchanged, because behave normalizes keywords to a canonical form before matching:

Fitur: Saldo rekening

  Skenario: Menarik uang
    Diketahui saya memiliki rekening dengan 100 USD
    Ketika saya menarik 30 USD
    Maka saldo rekening adalah 70 USD

Per-File Language

If only one feature file lives in another language, you can add a language directive at the very top of that file instead of changing the whole run:

# language: de
Funktionalität: Guthaben

  Szenario: Geld abheben
    Angenommen ich habe ein Konto mit 100 USD
    Wenn ich 30 USD abhebe
    Dann ist der Kontostand 70 USD

Practical Advice

  • Use the local language for files that the business team reads and edits; keep it English when the team is international.
  • One language per file; mixing keyword dialects inside a single file is not supported.
  • Translating keywords is cosmetic for the engine, but step text is data: translate step text and step definitions together, or keep step text in one language and only the keywords local.

Summary

Behave supports Gherkin in dozens of languages via -l / --language or a # language: file directive. The step definitions stay unchanged; only the feature file's keywords change.