Forum: Rails I18n Globalize2 advice needed

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1cee0a9c7789c89ff05d3a019617ff08?d=identicon&s=25 Max W. (max-williams)
on 2010-02-08 13:57
Hey all

I'm doing my first i18n app in rails 2.3.4.  I installed the globalize2
plugin and am now struggling to understand what's going on - there's not
much documentation i can see for globalize2 besides the home page
(http://github.com/joshmh/globalize2#readme) which isn't very in-depth.

Does most of the documentation for globalize (eg
http://globalize-rails.org/wikipages/getting-started#install)  apply?
Globalize2 says it hooks into i18n which comes shipped with rails post
2.2, so should i just be following the i18n documentation instead?
(http://guides.rubyonrails.org/i18n.html)

Do i even need to use globalize2?  Is it better to just stick with rails
built in i18n?  Globalize doesn't seem to be compatible with rails 2.2.

Kind of confused, basically, grateful for any advice.

thanks, max
B269a661e18295adcd1430e9716bd668?d=identicon&s=25 Henrik -. (malesca)
on 2010-02-08 14:44
(Received via mailing list)
On Mon, Feb 8, 2010 at 13:57, Max Williams <lists@ruby-forum.com> wrote:
> Hey all
>
> I'm doing my first i18n app in rails 2.3.4.  I installed the globalize2
> plugin and am now struggling to understand what's going on - there's not
> much documentation i can see for globalize2 besides the home page
> (http://github.com/joshmh/globalize2#readme) which isn't very in-depth.

The built-in i18n does a lot. I think all Globalize2 adds is model
translations (translating attributes like item.description or
whatever). I prefer http://github.com/iain/translatable_columns/ for
that. For translations in controllers, views, mailers, helpers etc,
i18n is all you need.
1cee0a9c7789c89ff05d3a019617ff08?d=identicon&s=25 Max W. (max-williams)
on 2010-02-08 16:52
Henrik --- wrote:
> On Mon, Feb 8, 2010 at 13:57, Max Williams <lists@ruby-forum.com> wrote:
>> Hey all
>>
>> I'm doing my first i18n app in rails 2.3.4. �I installed the globalize2
>> plugin and am now struggling to understand what's going on - there's not
>> much documentation i can see for globalize2 besides the home page
>> (http://github.com/joshmh/globalize2#readme) which isn't very in-depth.
>
> The built-in i18n does a lot. I think all Globalize2 adds is model
> translations (translating attributes like item.description or
> whatever). I prefer http://github.com/iain/translatable_columns/ for
> that. For translations in controllers, views, mailers, helpers etc,
> i18n is all you need.

Thanks Henrik.  I ended up ditching globalize2 and just using I18n.  I'm
currently looking at the translate routes plugin
(http://github.com/raul/translate_routes) for handling my urls.  Looks
good.

cheers, max
F3f9c2dee45279a8220cdad901be6f06?d=identicon&s=25 Andrés G. (andresgutgon)
on 2010-02-08 18:12
(Received via mailing list)
My advise is: First learn I18n and then learn Translate routes o
Globalize.
Step by step. I'm newbe too

2010/2/8 Max Williams <lists@ruby-forum.com>

> > translations (translating attributes like item.description or
> --
> http://groups.google.com/group/rails-i18n?hl=en.
>
>


--
Experiencia es lo que obtienes, cuando no obtienes lo que quieres.
1cee0a9c7789c89ff05d3a019617ff08?d=identicon&s=25 Max W. (max-williams)
on 2010-02-08 18:25
Hi Andres, i think you're right.  The translate_routes plugin is great
btw.  Not only does it seamlessly prefix the country code into the url
but also it translates the url if it finds a translated section.  So you
would have

/my-account

in english, and

/de/mein-konto

in german, with no work required other than putting an entry for
my-account into your strings file.  In your code you still just refer to
it as "account_path" or whatever.
grimen (Guest)
on 2010-02-09 19:57
(Received via mailing list)
Yes, totally. Globalize2 just messed up things for me when I tried it
a year ago, so I successfully rolled with
http://github.com/janne/model_translations
instead which together with I18n and minor tweaks do what Globalize 2
do. Globalize 1 made sense, Globalize 2 is not - I would state.

grimen
1cee0a9c7789c89ff05d3a019617ff08?d=identicon&s=25 Max W. (max-williams)
on 2010-02-10 10:07
Thanks grimen!
This topic is locked and can not be replied to.