On Jan 3, 6:30 pm, "Daniel Schierbeck" <[email protected]>
wrote:
>
> Only thing I have against this is that I believe all code should be
> written in English (I'm Danish myself).
This is what I do, but there are exceptions.
For example I am writing ActiveRecord models for an Italian
University. There are no good English translations for many model and
attributes names, because these are technical terms used only in
Italy.
The same is true for many other applications.
In my opinion Ruby (and Rails) support for other languages is
excellent because you can do:
# app/models/facoltà.rb
class Facoltà < ActiveRecord::Base
def unità
end
end
and it does the right thing! You can use utf-8 characters everywhere
and it just works. I only changed 5 regular expression to accepts [à-
ùÀ-Ù] and now I can use accents in file, class, function, attribute,
and variable names.
This also works fine with RSpec and Cucumber. In rspec you only need
to add
$KCODE = 'u'
Cucumber just works. And you can also use accents in URLs (as
WikiPedia do...).
It does not make sense not to use non English words if there's no good
English translation for them.
Marcello
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---