Try our conversational search powered by Generative AI!

Simple address not working for replacement language



On the website I am working on I have the NL language and the NL-BE locale. NL has content configured and NL-BE is configured as a replacement language.

For certain pages simple address is configured under the NL language. This works fine for .nl but does not work for .be (which is mapped to nl-be). Can someone help me out?

Apr 01, 2015 11:17

Hi, Niels,

I haven't been playing around with replacement languages for a while, but what I know is that the simple address does not work until page is published. For example, if I set a simple address on a delayed published link, the simple address will give 404. I think this is a desired behavior, since you don't want anyone to access the content until it's published. In relation to that, if you do the same for a language that is being replaced with some other language, that would mean that the content is not ready, so to me it looks like this is by design.

Does this make sense or have I misunderstood you?

Apr 01, 2015 14:42

Hello Marija,

The reason I have the two languages is because they are both using the same content except for a few pages. So what I want is to have the belgium site use the dutch content unless the language is added specifically. And this is possible when using the replacement language feauture. I would suspect that when I configure a replacement language will mean that it will show the data of the replaced language and use the same settings. But if I understand you correctly the belgium version of the site is not published, because it does not exist, so the simple address does not work, correct? Then is there a way to change this behavior? Maby with routing or something? 

Apr 01, 2015 15:10


I've now set up three languages on alloy tech templates: English, Nl and Portuguese (Brasil). Then I've added NL as replacement for Brasil. Then I've set up a simple address on Brasil page. The simple address doesn't give 404 and it shows the content from NL, since NL is a replacement language for Portuguese. (settings) (edit mode) (view mode)

Is this how it works for you as well or can you share a screenshot what the result is on your side?

Which version of EPi are you using btw?

Edited, Apr 01, 2015 15:35

It works when I add the belgium language and set the simple address. That is at least a temporary solution so thank you for that. Tho we have a lot of pages and it would be kinda anoying if we have to add the belgium language for every page just to make sure the friendly url works.

Apr 01, 2015 15:47

Can you send me a screenshot how it's set up now, since I still haven't figured out in which case this doesn't work? Sorry about the slow afternoon brain :)

Apr 01, 2015 15:49

So by setting this by default for every page, all pages are using nl content for belgium sites. 

Now if I create a page in NL i want it to also be available for BE. So this is the setting of a new page:

As you can see the belgium language is not added, tho if you go to the full url it works on the belgium site. The only thing that is not working is the friendly url. If I add the language:

It does work, which is great :) but its a bit anoying if I have to do that for every page I make. So I am looking for a way to make friendly urls work for replaced languages, even if not created.

Apr 01, 2015 15:56

Now I get it! Have you tried playing with strictLanguageRouting, see this article (although Johan doesn't mention the replacement scenarios)?

Apr 01, 2015 16:31


After some further testing we still had a problem. I tried the solution in the article and now I have the problem that the url also works for for example germany or us. It does not matter if I configure the replacement language it will just use the default language.

So for example:

so only nl is configured

BE is configured to use replacement language NL

and added the SimpleAddressModule code from the article you send. Now .be/test3 shows the nl site, which is correct, and ofcourse .nl/test3 still works. But also .de/test3 and .com/test3

Any way i can fix it so it just works for the replacement language?

Apr 02, 2015 15:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.