Jun
Tonight at the Pivotal office I showed a few people the updates and modifications I’ve made to the globalize plugin for Rails.
My main motivation was fixing Globalize to work with Rails 2.1. They changed the way rails views are selected and rendered, and the date_helper api, both which broke the plugin. I forked globalize on github and my fork now works with Rails 2.1.
UPDATED June 14: Thanks to tips from jodosha and David Ramalho, I’ve made a few updates to the branch that fix a few things.
Get the plugin for Rails 2.1.0script/plugin install git://github.com/heythisisnate/globalize.git>> "Biodiesel Stations".t
=> "Biodiesel Stations"
>> Locale.set 'zh-tw'
>> "Biodiesel Stations".t
=> "生質柴油"In addition to string translations, Globalize does a lot more, including date & time localization, currency, and number formatting differences. It handles pluralization supremely. The original team did a great job, and I’m happy to contribute my changes for Rails 2.1.
I’ve hacked on a few additional features that I previewed tonight … they’re not quite ready for prime time yet. I’ll definitely publish them here when they are.



Hey, I’m using Rails 2.1 and have been having all sorts of problems with Globalize . I’ve switched to you branch and at least the date_select thing is solved (I had solved it myself earlier) but there’s still a problem that globalize had with the active_record_helper class. I’ve found the solution here (http://codesnippets.joyent.com/posts/show/896) and it solves it :) maybe you would want to include it… or not ;)
either way, thanks and I just wanted to let you know
Hi there, thanks for your work on this and the fork on GH. 2.1 is a bit of a minefield (or maybe Globalize is starting to show its age?).
I was wondering if you had had any luck with the “is not missing constant” exceptions thrown by the db_localizes_translates_test.rb?
Hi, thanks for a great work!
Globalize works for me with Rails 2.1 now. To make finders work with MySQL I changed the regexp at line 850 of
This was inspired by the solution at Nabble (sorry, textile breaks the full dashed URL to the entry). I just made it aware of backticks in table name.db.translate.rbtoHaving trouble installing your plugin.
F:\NetBeansProjects\myproject>ruby script/plugin install git://github.com/heythisisnate/globalize.git removing: F:/NetBeansProjects/myproject/vendor/plugins/globalize/.git
Anyone knows why this is not working?
When I tried to install your globalize version I always get this: F:\NetBeansProjects\myproject>ruby script/plugin install git://github.com/heythisisnate/globalize.git removing: F:/NetBeansProjects/myproject/vendor/plugins/globalize/.git
After installing your plugin the functional tests doesn’t work anymore…
assert_template ‘edit’ ->
expecting <”edit”> but rendering with <”edit.html.erb”>
The integration tests doesn’t work too
assert_template ‘people/show’
expecting <”people/show”> but rendering with <”/Users/user/Documents/workspace/project/app/views/people/show.html.erb”>
Any idea?
@Heinz: make sure you have git installed on your system.
You should officially take over the Globalize project. They haven’t updated in about a milennium!
Lovely to see you are using Git. I think i could try adding it as a git submodule, right?
I love you SO MUCH!!! You made my application work again!
For anyone who wants to use this as a submodule, it works perfectly like this:
git submodule add git://github.com/heythisisnate/globalize.git vendor/plugins/globalizeThe only problem is i now have a problem with TimeZone.unadjust … i seem to remember i had to tweak that for Globalize when i first got it.
Probably about time i learned the new 2.1 way of doing TimeZones!
Ah … when i used Globalize before i wanted to keep track of who had contributed translations. So i added a
belongs_to :personin the translation.rb model. What’s the best way for me to do this now that i’m using your shiny new version? I guess i need to extend it somehow … but i have no idea how or where i should do that.