Dose aly library exist for translate routing?

Hey every one,

Have simple code in term of define idea:

  live_session :default,
    root_layout: {MyApp.LayoutView, "live_public.html"}
    scope "/", MyApp do
      pipe_through(:browser)

      live("/", HomeLive)
    end

  scope "/", MyApp do
    pipe_through(:browser)

    get("/about", AboutController, :index)
  end
  end

I want to have something like this with http and also with LiveView.

/about -> "AboutController, :index"
/en/about -> "AboutController, :index"
/fr/à-propos ->  "AboutController, :index"

/ -> HomeLive
/en -> HomeLive
/fr -> HomeLive

Dose any one know any lib for it?

@Moein-Abbasi, welcome to the forum.

I suggest looking at Library for localized/multilingual routes in Phoenix by @BartOtten.

If you happen to be working with ex_cldr then ex_cldr_routes might be another alternative.

1 Like

Thanks so much.

1 Like