hi guys,
I have some project with multiple languages.
with octobercms 2.x I was used to manage different page urls with the help of the translation plugin like this:
page.htm
url = "/land"
title = "..."
layout = "..."
[viewBag]
localeUrl[en]="/country"
When I visit the default url /de/land
everything works as expected.
Now I expect the english page to be like this: /en/country
.
Unfortunately I get a 404 (page not found). Anyone has an idea?
Hey guys. I fixed my “issue”.
The problem has been, I am used to write the cms pages by hand in my IDE.
Now I used the backend and this is the working result.
url = "/land"
layout = "default"
title = "Land"
[viewBag]
localeUrl[en-gb] = "/country"
It didn’t worked, because i was using the wrong language code.
I should have used en-gb
. Instead I was used to write my own code en
.
Problem solved.
1 Like
daft
December 3, 2022, 1:39am
#3
Thanks for sharing the solution!