French Canada(fr-CA) Culture, After Form Submit returns to default English Canada(en-CA) Version.

Gurupada Giri asked on February 11, 2024 19:16

We are working on Kentico Version 13.0.137, .Net Core 6. We are developing the Site for the en-CA and fr-CA Culture.

For the First time form load in the fr-CA Culture is all the Text are converting correctly in the forms label, Submit button. added Screenshot. Image Text.

After Form Submit to Validate the Forms Validation Text, forms is converted to the default Site Culture en-CA. Added Screenshot.

Image Text.

We have configured the 2 Culture, en-CA and fe-CA both culture configured as a UI culture.

Kentico Forms is developed using Kentico Form Builder. In Form Builder Textbox label, Error Messages, Submit Button and Confirmation Text set as a Culture Macro.

The issue is After Form Submit in fr-CA(French Canada) Culture, after Form Submit always converting to en-CA (English Canada) Culture. Please Suggest how to fix the issue.

Correct Answer

Gurupada Giri answered on February 21, 2024 08:32

Thanks Elmar and Juraj for Responding. I have identified the issue, the issue is in the cultureParemeterName, in the Culture Middleware.

In the start Up file, we defined cultureParemeterName = "culture" but on form submit the cultureParemeterName = "cultureCode", In the HttpContent.Request.RouteValues, cultureParemeterName is "cultureCode". After changing to "cultureCode", the issue got resolved.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Juraj Ondrus answered on February 12, 2024 09:17

Could you please provide a detailed, step by step instructions and configuration details how to reproduce the issue? I just tried using the out of the box installation with the sample Dancing Goat project and it is working fine. I guess there is maybe some redirection going on or the way you are detecting culture.

0 votesVote for this answer Mark as a Correct answer

Gurupada Giri answered on February 12, 2024 12:47 (last edited on February 12, 2024 12:56)

Hi Juraj, Thanks the Quick Response. I have configured multicultural Site in the Kentico Admin. Added the en-CA and fr-CA culture .

Image Text

Also enabled the settings in Kentico Admin.

Image Text

In the StartUp file. Added below code

Image Text then added a CultureMiddleware, which is getting value from the Routing and setting Value in the Current Thread. Image Text

Please suggest. We spent 3-4 days time to identify the issue, but didn't find solution yet.

0 votesVote for this answer Mark as a Correct answer

Elmar Höfinghoff answered on February 20, 2024 10:24

Just an idea... Could it be possible, that the culture context is switched to enUS if the error label texts are not found for frCA? Have you tried to translate the form validation keys to frCA? The keys are not in the Localization app, they are located in the [...]/CMSResources/CMS.resx file. Try to add the concerned validation keys for frCA and check if this helps. My idea is, that the context culture may bv switched because the validation keys are not found in the current language.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on February 21, 2024 05:51

Are you able to reproduce the issue using the sample Dancing Goat Core project? If yes, what are the steps please?

0 votesVote for this answer Mark as a Correct answer

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