This repository was archived by the owner on Nov 16, 2018. It is now read-only.
forked from cucumber/cucumber-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Spoken languages
aslakhellesoy edited this page Aug 13, 2010
·
39 revisions
Communication within a team always works better when people can use their spoken language. Cucumber supports about 20 spoken languages. 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 noIt’s easy!
- Make a fork of Cucumber and pull it down
- Add your language’s keywords to languages.yml
- Generate the parser for your language:
rake treetop:compile spec
That’s it! You have a new language that you can pass to Cucumber’s --language option.
Just copy the examples/i18n/en</code 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 <code>rake i18n from the examples/i18n directory.