Giter Site home page Giter Site logo

Comments (4)

tagliala avatar tagliala commented on June 18, 2024 1

Hi and thanks!

This is a good point and I'm open to ideas. This is worth at least a wiki page

I'm not using route_translator in production in the past few years, and I would avoid to manage the complexity of http headers in this gem

For this purpose, I was using http_accept_language and the following custom controller concern: https://github.com/diowa/icare/blob/main/app/controllers/concerns/route_localizer.rb

I think that it is possible to skip route translator's around_action :set_locale_from_url for the root_path action, or maybe prepend an around action, and take advantage of http_accept_language to conditionally redirect to the proper path

Let me know

from route_translator.

pglombardo avatar pglombardo commented on June 18, 2024 1

That's a good suggestion. I believe I will go this route with http_accept_language and will have to dig into the implementation of :set_locale_from_url a bit. Much appreciated.

And if you're interested, I'm using route_translator in Password Pusher (staging site with route_translator) pending release to pwpush.com this weekend.

from route_translator.

tagliala avatar tagliala commented on June 18, 2024 1

@pglombardo if you want to share a snippet of code for this use case, feel free to add a wiki page, that would help others

from route_translator.

pglombardo avatar pglombardo commented on June 18, 2024

I believe we can close this now. Thanks for the help!

from route_translator.

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.