I have a small
Mojolicious app that display a page
$r->get('/libmap');
And load a
libmap.html.ep template in the
./template folder.
This file uses js files that are in the ./public folder.
I would add a locale in the url:
....:3000/fr/libmap, without having any other change in the path of the template or public folders,
I tried
$r->get('/:loc/libmap')->to(template => 'libmap', loc=> 'en');
but it fails with Page not found...
What am I missing ?
Thanks!
Edit: I have a utils.js file that is searched in public/fr/utils.js folder instead of public/utils.js folder.
That were the problem is... How can I keep on with having all my js files in ./public and not in public/fr, public/en ... ?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.