Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6562533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:43:14+00:00 2026-05-25T13:43:14+00:00

I’m on Rails 3 and on my 2nd Rails project (i.e. I’m a newbie).

  • 0

I’m on Rails 3 and on my 2nd Rails project (i.e. I’m a newbie). I am making a website with several locales, at the moment Swedish and US. I am using the I18n_routing gem to create localized url:s. I am also using the friendly_id gem to create better urls.

My problem: I cannot get my nested urls to be translated. They remain as the default-urls.

This is my routes.rb:

  localized(I18n.available_locales, :verbose => true) do
    resources :calculation_types, :only => [:show], :path => '' do
      resources :calculations, :only => [:index, :show], :path => '' do
        member do
          put 'calculate_it'
          get 'calculate_it', :redirect_me => true
          get 'link'
        end
      end
    end  
  end

  localized(I18n.available_locales, :verbose => true) do
    match 'searchresults' => 'home#search-results', :as  => :searchresults
    match 'about' => 'home#about', :as => :about   
    match 'advertise' => 'home#advertise', :as => :advertise
    match 'terms' => 'home#terms', :as => :terms
    match 'calculator' => 'home#calculator', :as => :calculator
    match 'feedback' => 'home#feedback', :as => :feedback
  end 

This is a sample (cut) of my locale (for Swedish):

se:
  named_routes_path:
    about: 'om'
    advertise: 'annonsera'
    calculator: 'kalkylator'
    feedback: 'feedback'
    searchresults: 'sokresultat'  
    terms: 'anvandaranvisning'

  resources: 
    accumulated-passive-income: "vardet-av-din-passiva-inkomst"
    all-about-a-date: "allt-om-ett-datum"
    area: "area"
    average-speed: "genomsnittshastighet"
    birthday-in-days: "fodelsedag-i-dagar"

These are some facts of the case:

  • The resources-translations include both “calculation_types” and “calculations”.
  • I have tried several set-ups in the translation file.
  • The SECOND routing WORKS, the one with the “match”, they also appear when I do rake routes.
  • I get no error messages. Everything works fine.
  • I am using friendly_id as the url-words. An example of a url could be http://local.domain.com:3000/diet/bmi where “diet” is calculation_type.friendly_id and bmi is calculation.friendly_id

I want help with:
– Why do the nested routes not show up as routes? Why are they not being created?
– How do I get this to work?

Do you need any more info to help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:43:15+00:00Added an answer on May 25, 2026 at 1:43 pm

    It seems like it is not a matter of I18n_routing after all since the words that should be translated are actually friendly_id:s. So, disregard the I18n_routing part of this problem and focus on the friendly_id-translation…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I am using JSon response to parse title,date content and thumbnail images and place
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.