Forum: Ruby on Rails globalize plugin question

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.
B9a732fc30c32098347a0177c75ee27b?d=identicon&s=25 jeroen (Guest)
on 2005-12-06 12:34
(Received via mailing list)
Hi,

I'd like to try and use the Globalize plugin, but I only need a subset
of the features that plugin provides. I'd like to:

- translate text in views
- format date/time/numbers using different locales

I won't be using stuff like:

Locale.set("en-US")
prod = Product.find(1)
prod.name -> "Meatballs"

Locale.set("es-ES")
prod = Product.find(1)
prod.name -> "Albondigas"

Since I have no data in my models that requires translating, is there
any way I can turn off translating model data altogether? I'd rather not
have Globalize override Rails core classes for something I'm not using.

It not a huge deal, but It would be nice if this were possible.

Cheers,

Jeroen
00d273ccc52850c2b8cfc2991f32ea44?d=identicon&s=25 Tony Tseng (Guest)
on 2005-12-12 21:05
Hi Jeroen,
Have you tried to comment out the following line in init.rb:
require "globalize/rails/active_record"

That should do the trick. (although I haven't personally tested it)

HTH,
Tony

jeroen wrote:
> Hi,
>
> I'd like to try and use the Globalize plugin, but I only need a subset
> of the features that plugin provides. I'd like to:
>
> - translate text in views
> - format date/time/numbers using different locales
>
> I won't be using stuff like:
>
> Locale.set("en-US")
> prod = Product.find(1)
> prod.name -> "Meatballs"
>
> Locale.set("es-ES")
> prod = Product.find(1)
> prod.name -> "Albondigas"
>
> Since I have no data in my models that requires translating, is there
> any way I can turn off translating model data altogether? I'd rather not
> have Globalize override Rails core classes for something I'm not using.
>
> It not a huge deal, but It would be nice if this were possible.
>
> Cheers,
>
> Jeroen
This topic is locked and can not be replied to.