translatable paths
See original GitHub issueThank you for such an awesome routing library, I am going to switch from React Router 4 😃
All in all, I think I know how to cover all cases, except for one - having translatable routes in routesMap
:
so, instead of this:
const routesMap = {
HOME: '/home'
};
something like this:
const routesMap = {
HOME: : {
en: '/home',
de: '/haus'
}
};
en
or de
could be part of redux state.language
for example.
Would it be possible to achieve something like that with this library?
Issue Analytics
- State:
- Created 6 years ago
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Translatable pathways classification (TransPath-C ... - PubMed
This method uses variation of pathway activation in the mouse model to predict both mouse and human disease phenotype. Analysis of shared ...
Read more >Translating Example Paths and URLs — Localization Guide ...
In translatable messages you will find real paths and URLs but you will also find instances where the author is giving the user...
Read more >next-translate-routes - npm
Flexible and translated routes for Next.js without custom server. Latest version: 1.9.1, last published: a month ago.
Read more >Career Paths – Translation And Interpreting
Career Paths · Translators work with written or multimedia materials and translate only into their native language. · Interpreters · Language transcriptionist: ...
Read more >aw-studio/laravel-translatable-routes - GitHub
A package for creating and managing translatable routes in laravel. Setup. Install the package via composer: composer require aw-studio/laravel-translatable- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@klis87 you need to have a payload as well on your actions, such as:
{ type: 'HOME', payload: { lang: 'haus' } }
Hey there, we just released optional params, regexes in paths, multi segment parameters and more. Essentially advanced path definitions:
https://github.com/faceyspacey/redux-first-router/issues/83#issuecomment-327703226
This may help your use case. For example, you can now do:
Or even better:
Now that route will only be matched for
home
orhaus
andpayload.lang
will have the language for you.