0

I'm building an angular website with SSR support and multilanguage. I'm building an EN, FR and DE version. Everything works but I was wondering if I can make the default language (en in my case) have the route mywebsite.com and not mywebsite.com/en

Also, I have some files such as sitemap and robot.txt that are being produced under mywebsite.com/en/robot.txt and mywebsite.com/en/sitemap.xml. How can I force them to be exported under the root folder (mywebsite.com/robot.txt and mywebsite.com/sitemap.xml respectively)?

2
  • Create you own dynamic routes. If there is no lang in URL then use the default one. This stackoverflow.com/a/64394946/1817690 may help you. Commented Nov 5, 2024 at 11:29
  • 1
    What library or API are you using for translations? ngx-translate typically doesn't add language codes in the URL. Commented May 14 at 13:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.