We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wanted to make english to be default language:
config :polygot, locales: %{ "en" => %{ path_prefix: "" }, "pl" => %{ path_prefix: "pl" } },
It doesn't work. So i modified Polygot.Plug to use language with empty prefix when there is no prefix in route.
defmodule Polygot.Plug do # def call(conn, _opts) do {locale, _} = Enum.find @locales, fn item -> {locale, %{path_prefix: prefix}} = item prefix == "" end Gettext.put_locale(@gettext, locale) conn |> assign(:locale, locale) end end
It works well in my very small (almost static) app, but I don't know if it's a good solution
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I wanted to make english to be default language:
It doesn't work. So i modified Polygot.Plug to use language with empty prefix when there is no prefix in route.
It works well in my very small (almost static) app, but I don't know if it's a good solution
The text was updated successfully, but these errors were encountered: