First of all, this project helped me out a lot. Big thanks!
I do have a bug report if the locale string in the url differs from the ISO string. In this exact project this bug is not an issue because all the urls (e.g. /de/es) match de ISO locales (de, es) setup in angular.json.
However when you want for example the url to be /benl for ISO code nl-BE. The hrefs are correct when rendered on the client, but not on the server. Aka when disabling JavaScript (for testing purposes) all href are broken links.
Steps to reproduce
In Angular.json, add the following code into i18n.locales:
First of all, this project helped me out a lot. Big thanks!
I do have a bug report if the locale string in the url differs from the ISO string. In this exact project this bug is not an issue because all the urls (e.g.
/de
/es
) match de ISO locales (de
,es
) setup in angular.json.However when you want for example the url to be
/benl
for ISO codenl-BE
. The hrefs are correct when rendered on the client, but not on the server. Aka when disabling JavaScript (for testing purposes) all href are broken links.Steps to reproduce
In
Angular.json
, add the following code intoi18n.locales
:In
proxy-server.mjs
, add the new server:(You also need a messages.nl-BE.xlf file)
Result server render
<a routerlink="/page-1" href="/nl-BE/page-1">Page 1</a>
<-- WRONG Result client render<a routerlink="/page-1" href="/benl/page-1">Page 1</a>
<-- CORRECTInterestingly enough the
<base href="/benl/">
is correct on both server & client side rendering.Any help is appreciated.