On Tue, Jan 13, 2009 at 10:11 PM, James B. [email protected]
This is more of a “best practices” question.
I’ll describe a practice that has worked well for me.
(I stopped believing in best practices several years ago :-))
I know that this will work but, is there another, preferred, way of
handling this situation?
I’m developing a multilingual app now. Based on the user’s preferences
will display UI elements (text, links etc) in either Norwegian, Nynorsk
Norwegian) or** SÃ¡mi (the 3 official languages in Norway).
We use Webrat, and for the Cucumber Scenarios we have chosen one
language - Norwegian. (Actually, it’s not that arbitrary - it’s what all
developers speak and write). In order to make the scenarios readable for
stakeholders we prefer to refer to use the visible text instead of the
id or names. (This also verifies that the tags have properly
corresponding “for” attributes). So we say (translated):
When I fill in “Drammensveien 1” for “Address (work)”
This is much better than
When I fill in “Drammensveien 1” for “user_work_address”
So what about the other languages? We don’t even think about them in 95%
the Cucumber features. We have one feature file that just verifies that
get SÃ¡mi UI instead of Norwegian when the user sets preferences to that
language. This is to verify that the language switching logic works ok.
also have a few RSpec specs to verify the same down at the ActiveRecord