BartOtten
Library for localized/multilingual routes in Phoenix
This lib is now published and has a new topic.
Once this topic was about PhxAltRoutes. A lib pioneering localized routes for Phoenix.
It’s experimental work sparked and influenced second generation routing libs such as Cldr-Routes and Phoenix Localized Routes.
Phoenix Localized Routes is superseded by the third (and currently latest) generation: Routex - Extension driven superpowers for Phoenix Routes
Most Liked
BartOtten
Update
- The public API is becoming stable
- Localized Routes on Phoenix 0.16 was easier than on Phoenix 0.17. Ah well, got lot’s of goodies in return.
- Lots of refactoring still to do
THE BRAVE MAY START TO USE IT IN AN HOBBY PROJECT
Changelog
- Add example how to list all alternative routes on a page: http://localhost:4000/products
# the original route is wrapped in `PhxLocalizedRoutes.Helpers.loc_route` which receives a scope config (opts).
<%= for {slug, opts} <- ExampleWeb.LocalizedRoutes.local_scopes!(flat: true) do %>
<span>
<%= live_redirect " [#{slug}] ", to: PhxLocalizedRoutes.Helpers.loc_route(Routes.product_index_path(@socket, :index), opts) %>
</span>
<% end %>
malloryerik
Get well soon!
BartOtten
CLDR had it’s release of CLDR Route which was inspired by this lib-in-progress. There is overlap in purpose, yet enough difference in features to continue this lib. Will make a comparison table some day to help users making the choice what fits best for their purpose.
Due to the better documentation and function naming skills of @kip, I have merged back some improvements. So thanks Kip for part of this update!
- alias original helper module as OriginalRoutes
- improved docs
- improved function naming
- :assigns => :assign (to keep :assign_new as option for the future)
- development: more debug logging
- development: better stacktrace
- much more
Todo:
- assign inheritance
- getting rid of the Assigns struct
- e2e tests in addition to current low level tests
Later:
- loc_link which also translates the links(??)
- option to not render a parent route
Popular in RFCs
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









