elixir-cldr / cldr

Elixir implementation of CLDR/ICU
Other
455 stars 34 forks source link

Cldr.Plug.SetLocale from session failed #131

Closed Ray-Wang closed 5 years ago

Ray-Wang commented 5 years ago

Plug Cldr.Plug.SetLocale, from: :session

An exception was raised (FunctionClauseError) no function clause matching in Cldr.Plug.SetLocale.return_if_valid_locale/1 (ex_cldr) lib/cldr/plug/plug_set_locale.ex:203: Cldr.Plug.SetLocale.return_if_valid_locale("en")

kipcole9 commented 5 years ago

Thanks for the report and sorry for the inconvenience. Can you show me the code where you set the locale in your session? I understand why the exception is being raised but before I put in a fix I’d like to validate an assumption about how the locale in the session is being set.