Preferred user interface culture

Monjoie Dominique asked on August 2, 2017 15:53

Hi,

we are two different persons working with this CMS. My preferred user interface culture is English - USA and my colleague works under French - France. Our preferred content culture is French - France for both of us.

When I copy-paste a decimal number in a field of type Double, all is OK but when my colleague wants to save a document after doing the same thing, the system tells her that his value is not a number; in Belgium, decimal separator is a comma, so it's necessary to replace the dot separator between unities and decimals by a comma to be able to save the record.

Is there a way (first, I thought about a French - Canada preferred interface culture to get the decimal point separator instead of the comma) to allow my colleague to save her datas without replacing each time the point by a comma.

I'm not sure it's very clear to undestand what I mean but I don't know how to explain in a better way.

Correct Answer

Trevor Fayas answered on August 2, 2017 16:52

Very interesting situation!

You may need to utilize a custom form control to be honest, i am not sure if there is something that can know to switch it back and forth otherwise.

If it's as simple as a textbox with the value in it, you would just overwrite the Value property's Get to do a quick check on the current user's culture (LocalizationContext), and replace commas with periods. You'll have to do some testing to make sure it behaves the way you want to.

https://docs.kentico.com/k10/custom-development/developing-form-controls/example-developing-custom-form-controls

If you aren't comfortable making a custom form control, tell us and we can try to help further.

Not sure if there is an In Kentico way of doing this though.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Monjoie Dominique answered on August 7, 2017 11:56

Hi,

Thanks for your quick answer. I'm not very familiar with the development of custom form control but I will try to understand what's behind the code in your link.

I have also asked to the Kentico support if there is a way to change the config of the language fr-Fr ?

0 votesVote for this answer Mark as a Correct answer

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