<div>One can change windows os DateTime region and language even browser can be set with different languages, what should I do if my website accepts DateTime, text and number in English and shows them in the same way?</div> <div></div>
<div>note: we keep everything in English in the database, and get it using Bl to webpages and then use javascript jquery to manipulate like sorting, filtering, formatting dates and etc</div>
As far as I think,you don't worry the problem.If you set the format in English of your website,,all user will get the data in English and you could use javascript to display them in DateTime,text and number.
Best regards,
Yijing Sun
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
Can you expand this a little? Do you mean that if the user types "couleur" (French) in a textbox you want to store "colour" (en-gb) in the database? Or do you want to store "color" (en-us) in the database?
It might be easier to put a note at the top of the web page saying "All input in American English (or British English, or Canadian English, or Belize English or whichever one you consider to be 'English') Please"
what should I do if my website accepts DateTime, text and number in English and shows them in the same way?
rajemessage
we keep everything in English in the database
As far as I think,your data in the database is American English and it will show in American English.
I don't understand your requirment.You could tell more details of your reuqirment to us.
Best regards,
Yijing Sun
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
entry is in en-US using .xls which is uploaded in the database , then it is shown in the data table of jquery grid on the browser, and manipulated by jquery and javascript, after that it is pushed to the database. ( this is the place we want everything should
be in en-US.
but as u know end-user can change the DateTime, region, language in windows and browser language also.
so my question what are the measures I should take to prevent them from entering wrong DateTime or text.
Are you sure that you have a problem? A Date in Excel is a NUMBER - the number of days since the start of last century. There is no 'English' date or any other language. A DateTime in a database is a NUMBER. There is no 'English' or any other language
for a DateTime.
How can you stop them entering the wrong date? You can't. People can always make mistakes or tell lies.
How can you stop them entering the wrong text? You can't. People can always make mistake or tell lies. (Have you seen what happens on the internet?)
Try to create the problem that concerns you. If you have an actual problem then show us your code, the input that gives the wrong result and what you would like the result to be for that wrong input.
Member
16 Points
174 Posts
what should i consider if my website accepts entry of date,number,text in English and we show dat...
Aug 30, 2020 08:26 AM|rajemessage|LINK
Contributor
4050 Points
1572 Posts
Re: what should i consider if my website accepts entry of date,number,text in English and we show...
Aug 31, 2020 02:36 AM|yij sun|LINK
Hi rajemessage,
Accroding to your description,do you have codes?
As far as I think,you don't worry the problem.If you set the format in English of your website,,all user will get the data in English and you could use javascript to display them in DateTime,text and number.
Best regards,
Yijing Sun
Member
16 Points
174 Posts
Re: what should i consider if my website accepts entry of date,number,text in English and we show...
Aug 31, 2020 03:50 AM|rajemessage|LINK
can u tell me where this formate is set in English with one example?
because windows and browser setting is in the hand of the user.
Participant
1660 Points
952 Posts
Re: what should i consider if my website accepts entry of date,number,text in English and we show...
Aug 31, 2020 06:23 AM|PaulTheSmith|LINK
Can you expand this a little? Do you mean that if the user types "couleur" (French) in a textbox you want to store "colour" (en-gb) in the database? Or do you want to store "color" (en-us) in the database?
It might be easier to put a note at the top of the web page saying "All input in American English (or British English, or Canadian English, or Belize English or whichever one you consider to be 'English') Please"
Contributor
4050 Points
1572 Posts
Re: what should i consider if my website accepts entry of date,number,text in English and we show...
Aug 31, 2020 08:56 AM|yij sun|LINK
Hi rajemessage,
As far as I think,your data in the database is American English and it will show in American English.
I don't understand your requirment.You could tell more details of your reuqirment to us.
Best regards,
Yijing Sun
Member
16 Points
174 Posts
Re: what should i consider if my website accepts entry of date,number,text in English and we show...
Aug 31, 2020 11:23 AM|rajemessage|LINK
entry is in en-US using .xls which is uploaded in the database , then it is shown in the data table of jquery grid on the browser, and manipulated by jquery and javascript, after that it is pushed to the database. ( this is the place we want everything should be in en-US.
but as u know end-user can change the DateTime, region, language in windows and browser language also.
so my question what are the measures I should take to prevent them from entering wrong DateTime or text.
Participant
1660 Points
952 Posts
Re: what should i consider if my website accepts entry of date,number,text in English and we show...
Aug 31, 2020 10:26 PM|PaulTheSmith|LINK
Are you sure that you have a problem? A Date in Excel is a NUMBER - the number of days since the start of last century. There is no 'English' date or any other language. A DateTime in a database is a NUMBER. There is no 'English' or any other language for a DateTime.
How can you stop them entering the wrong date? You can't. People can always make mistakes or tell lies.
How can you stop them entering the wrong text? You can't. People can always make mistake or tell lies. (Have you seen what happens on the internet?)
Try to create the problem that concerns you. If you have an actual problem then show us your code, the input that gives the wrong result and what you would like the result to be for that wrong input.