I''ve started working on rails translations and localization.
My first notes are at
http://wiki.rubyonrails.com/rails/pages/RailsLocalization
First doubt:
ri18n uses functions like _(), _i(), or n_() to mark translatable strings. We
need to mark some of these in ActiveRecord and maybe another components of
the framework. Since the translation framework is initialized by railties,
this may casue problems if ActiveRecord is used standalone.
So, possible solutions are:
- Quick (temporary I hope), something like:
if !methods.include?("_")
def _(str)
str
end
#and so on for the rest of the translators
end
- Best solution. Instead defining a wrapper function if ri18n is not loaded,
try to load a separate translation framework.
More to come...
Koke
--
Jorge Bernal <jbernal-OqA2i3GDl8k@public.gmane.org>
Warp Networks S.L.
http://www.warp.es/
[EN] http://koke.amedias.org/
[ES] http://www.amedias.org/koke