Hi everyone,

I would like to internationalize my hobo app but I encounter a problem.
The configuration should be like this :
Url to use
localhost:3000/:locale/...

In the I18n rails guide, it's said to add in application_controller:
def default_url_options(options={})
    { :locale => I18n.locale }
end

And in routes.rb :
  scope "/:locale", :locale => /en|fr/ do
           ...
  end

So that all urls generated by url_for or link_to are internationalized with
the locale in the first "subdir" of the url.

But, with hobo, this won't work.
Any use of <a> tag doesn't create the url like this.
Furthermore, the hobo_routes cannot be configured to be in this scope
either.

I tried to extend tag "a" like this :
<extend tag="a">
  <old-a params="&{'locale' => I18n.locale}" merge/>
</extend>

And this doesn't give what I want.
I only have the locale has parameter in the url (i.e. ?locale=en)
And the nav_items become broken. (I see label : <Not available>)

How should I do to make this works like in the standard rails guide ?

Thanks for any hint about that,
Arnaud.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to