Every repository with this icon (
Every repository with this icon (
Run the following if you haven't already:
gem sources -a http://gems.github.com
Install the gem(s):
sudo gem install aslakhellesoy-cucumber
Spoken languages
Communication within a team always works better when people can use their spoken language. Cucumber supports over 30 spoken languages. and the number is steadily growing. This is Norwegian:
Egenskap: Summering
For å ungå at firmaet går konkurs
Må regnskapsførerere bruke en regnemaskin for å legge sammen
Scenario: to tall
Gitt at jeg har tastet inn 5
Og at jeg har tastet inn 7
Når jeg summerer
Så skal resultatet være 12
Scenario: tre tall
Gitt at jeg har tastet inn 5
Og at jeg har tastet inn 7
Og at jeg har tastet inn 1
Når jeg summerer
Så skal resultatet være 13
You have to tell Cucumber that you’re using a different language than English (the default):
cucumber --language no
Listing the available languages
cucumber --language help
Listing the keywords of a particular language
For example Russian:
cucumber --language ru help
Adding a new language
(or completing an existing one). It’s easy!
- Make a fork of Cucumber and pull it down
- Add your language’s keywords to languages.yml
- Commit and push your changes – then send a pull request at GitHub.
Alternatively – if you don’t know Git and just grabbed the Gem:
- Edit the
languages.ymlin your gem. - Get in touch and attach the updated
languages.ymlto a new Lighthouse ticket.
That’s it! You have a new language that you can pass to Cucumber’s --language option.
Adding examples for a new language
Just copy the examples/i18n/en example to a new directory with the same name as the language you added.
Then translate everything in there. When you’re done you should be able to run rake i18n from the examples/i18n directory. If you want this code back into the official source you have to do those changes in your
own cloned Git repo.







