We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Matthias • 5 years ago

Great code, thanks! I would also like to be able to switch language for the project directory itself, not just the project entries. I display a category overview in /projects/index.twig but the translation does not know the translated directory name of course. I can fix this with a route, but it would be nice to be a bit more automatic.

My project template path is /projects/{slug} and the /translatedproject/{slug} for the other language, but the script only translates the URI's with a slug. It would be so great if it would also switch to /translatedproject/ if there is no slug!

Jan D'Hollander • 5 years ago

In my experience, it's best to make a craft entry for the "projects" page. That way you can add extra SEO data from the CMS etc. That approach also solves your issue.

Matthias • 5 years ago

Brilliant idea! That fixed it. Thanks very much

Thays Dos Santos • 5 years ago

Thanks!!

Christopher • 6 years ago

Awesome, thank you!