I have a node application using Kraken which uses i18n (makara) for localization and dust templates. I have defined many routes within the application which renders the en localisation correctly (being the default / fallback) without setting anything else up. e.g.
- /help
- /about
- /test
- ...
I now want to also have localized url for easy sharing etc. being /:lang/help and as below returning the correct dust template:
- /fr/help
- /fr/about
- /fr/test
Whats the ideal middleware to put in place to avoid having to edit each route i have already created?