Force Kentico to include culture in email links.

Regis Wengel asked on April 3, 2020 00:26

I've set up newsletter subscriptions on the site. The email templates contain the following needed macros

{% EmailFeed.SubscriptionConfirmationUrl #%}
{% EmailFeed.UnsubscribeFromEmailFeedUrl #%}
{% EmailFeed.UnsubscribeFromAllEmailFeedsUrl #%}

However the URL's that are generated by the macros do not include the culture code. So instead of the url being localhost/es-US/path/to/page it's localhost/path/to/page. This causes the subscription confirmation/unsubscribe to fail. When I manually add the culture in the URL it works just fine. Is there a way to force Kentico to add a culture? Doesn't even necessarily have to be the current culture, any culture would work fine.

I have a default culture set up on the site. The settings Use customer's culture for emails: and Force domain culture: are set to true.

Recent Answers


Juraj Ondrus answered on April 3, 2020 06:50

IF you are using the Force domain culture setting, this cannot be used with the language prefix option as described in the tooltip. So, you need to decide which option you want to use - language prefixes or forcing the culture by domain name.

1 votesVote for this answer Mark as a Correct answer

Regis Wengel answered on April 3, 2020 16:27

That's fine, I can remove the Force domain culture option. I guess Use customer's culture for emails only works for e-Commerce emails. Do you know if there's a way to achieve my above question?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.