Git Product home page Git Product logo

Comments (3)

kjvarga avatar kjvarga commented on July 17, 2024

Hi, I tried to install i18n_routes to see what the problem is, but I can't even get the sample code at https://github.com/kwi/i18n_routing/wiki working.

My routes indicate that I have some localized routes:
en_contents GET /english_contents(.:format) {:action=>"index", :controller=>"contents", :i18n_locale=>"en"}

But in the console I cannot generate any localized path using
app.en_contents_path

I've pushed the Rails3 app I created to the i18n_support branch. Can you take a look at that, and when you can get it to generate localized routes in the console, if you are still having problems generating the sitemap I can take another look at it.

from sitemap_generator.

kjvarga avatar kjvarga commented on July 17, 2024

Never mind, I've fixed it after looking at the Wiki pages which seem to be more up-to-date.

And, yes, it works! Take a look and see how I did it. If you wanted to use a different locale to the default, you shouuld be able to just set it in your sitemap config file before calling add_links:
I18n.locale = :pl

Let me know how you go.

PS You owe me a beer ;-)

from sitemap_generator.

pshemek avatar pshemek commented on July 17, 2024

Thank You for Your help - You simply proved that it MUST work for me.
It was a long and painful story; finally I found that one of the old plugins in vendor directory breaks the 'rake sitemap:create' task in the way that weirdly causes rake not to translate routes...

Thanks again!

from sitemap_generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.