BartOtten

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

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

# 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

malloryerik

Get well soon!

BartOtten

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

Where Next?

Popular in RFCs Top

bennydreamtech23
So recently I have been looking for ways to improve my workflow in elixir and I saw all the commands I need to run to setup a project and...
New
dergraf
Hey everyone! :waving_hand: I’ve been working on a side project for the last 4 months that I’m excited to share—it’s called ProxyConf! P...
New
simulacre7
Hi everyone, I’m building Aethrion, an early alpha Elixir runtime for persistent AI characters. Repo: GitHub - simulacre7/aethrion: A s...
New
bluzky
Hi everyone, I would like to introduce my new project OrangeCMS, it’s an application that help you to create/edit content post for your ...
New
jarlah
Hi! I have recently created, after having tried to get in touch with the creator of excontainers for quite some time, a new library call...
New
noizu
Hello, I wrote a more comprehensive llama_cpp nif wrapper noizu-labs-ml/ex_llama: (github.com) inspired by the unfortunately doa jereg...
New
manuel-rubio
There was some time when I started thinking about giving a boost to Lambdapad, the initiative from @garretsmith in Erlang that I loved wa...
New
weakwire
Hello people, Big fan of elixir &amp; phoenix LiveView. While designing LiveView applications I use LiveComponent extensively. Issue-I...
New
bortzmeyer
Not a replacement for serious authoritative DNS servers, of course, but useful for some uses (such as returning the IP address of the DNS...
New
blubparadox
Hi all. If you’ve looked on Twitter or YouTube you’ve seen the 1 billion row challenge, usually done in Java. I’ve written an Elixir vers...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement