Hi all.
I want to be my website works in 2 locales (en , ko)
so I followed this tutorial
I installed set_locala package
and it will look like this.
in router.ex pipeline :browser do plug :accepts, ["html"] plug :fetch_session plug :fetch_flash plug :protect_from_forgery plug :put_secure_browser_headers plug SetLocale, gettext: TextingWeb.Gettext, default_locale: "ko", cookie_key: "project_locale" end scope "/:locale", TextingWeb do pipe_through :browser # Use the default browser stack get "/", PageController, :index # Sign in and out get "/sign-in", AuthController, :new, as: :sign_in post "/sign-in", AuthController, :new, as: :sign_in get "/sign-out", AuthController, :delete, as: :sign_out get "/sign-in/:token", AuthController, :create, as: :sign_in get "/sign-up", UserController, :new, as: :sign_up post "/sign-up", UserController, :create, as: :sign_up get "/confirm-email", ConfirmEmailController, :new post "/confirm-email", ConfirmEmailController, :create end
It works ok, It displays other locale (Korean), but when I tried to sign-in, it doesn’t work.
params that I submited from sign-in form ignored,
[debug] Processing with TextingWeb.AuthController.new/2 Parameters: %{"locale" => "ko"} Pipelines: [:browser]
It only returns %{“locale” => “ko”}
how can I work around this?