HTML input using exonym suggestions - html

I am creating a website in German. No big deal I am nativ speaker.
If I misspell "Mittelsmann" by left the last character I have this suggestion from chrome:
This is usefull and I like to keep this behavior. But this input-field is an exception because it requires a scientific value and should be in english, so all suggestions for german words are basically wrong (call to Seiri of Kaizen).
Question: How can I force the suggestion to be in english for this input field ONLY?

That is a very good question. I'm German myself and ran into the same problem last year.
There are suggestions to let the HTML lang attribute decide which spellcheck is used (see the chromium developer discussion ending with WontFix/Closed). But sadly a lot of the current browsers (especially native browsers of the OS, and all mobile keyboards of cause) use the external spell checking provided by the OS.
So your wanted feature doesn't exist (resp. no standard for that), because a customized/picked language by JavaScript is often not transferable to the spell checker.
I solved my problem by adding and activating both languages German and English to my spell checker in Google Chrome, which resulted in getting both suggestions. That's not satisfying, but it worked for me.
Edit:
I also see a lot of German sites solving that problem by using attributes like autocorrect="off", autocapitalize="off" and spellcheck="false" on an "just English" input field to avoid confusing the user by German spelling suggestions and corrections. May that be an option to you?

Related

HTML text-direction regarding arabic content. Is using dir="rtl" really mandatory?

First of all sorry for this perhaps silly question. But I'm trying to figure out if the <dir="rtl"> attribute really is mandatory when displaying arabic characaters on a web page.
I've searched for a while now on this subject but I'm still puzzled. The W3C website states: "If a document contains right-to-left characters, and if the user agent displays these characters, the user agent must use the bidirectional algorithm." Source: https://www.w3.org/TR/html4/struct/dirlang.html
As far as I understand the above text this means that you will have to use <dir="rtl"> attribute but I can't find out why exactly.
The reason I'd like to know is that we have to create a 'somewhat' arabic version of a page without spending too much time on aligning and mirroring the whole website.
Does somebody know why the <dir="rtl"> attribute is mandatory? Or why it maybe why it is not mandatory? The more I read about it the more it starts messing with my head and I have a hard time finding a clear answer.
Kind regards,
Jan-Willem
This is mandatory because; 1. Its makes bots and users know how what language your page uses. 2. Its would display the text according to how that language is expected to be, rtl is mearnt for arabic and/or hebrews.

How to give tool tips (title) in locale language (UTF-8) in IE and Chrome?

I want to show tool tips (title) in locale specific language by UTF-8 formatted values.
I tried It's working in firefox but not working in IE and Chrome. What I have to do for this problem?
<div title='(some UTF-8 formatted value)'
above code is working perfectly in firefox.
Thanx in advance.
The font(s) used in tooltips depend(s) on the browser, which may or may not use settings made at the operating system level. Thus it may be controllable by the user, though few users know about this. In any case, it is outside the control of the author.
This implies that the repertoire of characters you can use there may vary. A plain square or rectangle in text typically indicates that there is a recognized character but it cannot be displayed because it is not present in the font(s) being used.
Partly for reasons like this, authors are more and more moving towards using other techniques than the title attribute, namely “CSS tooltips” (or maybe “JavaScript tooltips”). This lets you use the same fonts as in the textual content or, if preferred, to set some suitable other fonts.

display non-English language text in a message box

i wrote the following code in my application which is in MS Access, to display a message box in Farsi language(non-English language), but while i am typing in Farsi(Persion) it types in some special/unknown/different characters, and also while i run the application the message box displays that special/different characters instead of "احمد" which i want to be display.
msgbox("احمد")
any help well be my pleasure, and i really need for any kind of reply and help pleaseeeee.
Might check into unicode options for the controls you're using.
Edit: Based on a bit of googling I did, there doesn't seem to be any unicode support built in to msgbox (surprise to me), but other controls do support it by default apparently, leading to custom solutions. See below for links.
A forum post I found mentions a custom msgbox creator:
http://www.pcreview.co.uk/forums/msgbox-wont-display-unicode-characters-t2766299.html
Another post discussing how to make forms that will display a unicode message:
http://groups.google.com/group/microsoft.public.access/browse_frm/thread/4f2cd646023e0054/892dfd73309ad76b

How to prevent auto correction / suggestion of text in textarea?

We provide a page where a student can provide his answer to a certain question. This information is obtained via an input text area box and we would prefer that the browser doesn't auto correct and indicate grammatical errors on the student responses (e.g. obey is correct but obay is wrong). The browser shows a red underline if there are grammatical mistakes. How do I prevent this across all browsers.
HTML5 defined a new attribute for this... spellcheck=false
I don't think it can be done in previous versions of (X)HTML.
That is not possible other than disabling/uninstalling that feature in the browsers themselves. Make sure you uninstall their word processors too, while you are at it!

HTML differences between browsers

Do you know of any differences in handling HTML tags/properties in different browsers? For example, I once saw a page with a input tag with a maxlength field set to "2o". Firefox and Opera ignore the "o", and set the max length to 2, while Internet Explorer ignores the field altogether. Do you know of any more?
(Note: seeing as this will probably be a list, it would be great if the general name of the difference was in bold text, like: Different erratic value handling in tag properties)
Bug Lists
Web developers have already compiled some pretty comprehensive lists; I think it's better to compile a list of resources than to duplicate those lists.
http://www.positioniseverything.net/
http://www.richinstyle.com/bugs/table.html
http://www.quirksmode.org/ (as mentioned by Kristopher Johnson)
Javascript
I agree with Craig - it's best to program Javascript using a library that handles differences between browsers (as well as simplify things like namespacing, AJAX event handling, and context). Here's the jump to Craig's answer (on this page).
CSS Resets
CSS Resets can really simplify web development. They override settings which vary slightly between browsers to give you a more common starting point. I like Yahoo's YUI Reset CSS.
Check out http://www.quirksmode.org/
If you are programming in javascript the best advice I can give is to use a javascript library instead of trying to roll your own. The libraries are well tested, and the corner cases are more likely to have been encountered.
Scriptalicious - http://script.aculo.us/
jQuery - http://jquery.com/
Microsoft AJAX - http://www.asp.net/ajax/
Dojo - http://dojotoolkit.org/
Prototype - http://www.prototypejs.org/
YUI - http://developer.yahoo.com/yui/
Do you know of any differences in handling HTML tags/properties in different browsers
Is this question asking for information on all differences, including DOM and CSS? Bit of a big topic. I thought the OP was asking about HTML behaviour specifically, not all this other stuff...
The one that really annoys me is IE's broken document.getElementById javascript function - in most browsers this will give you something that has the id you specify, IE is happy to give you something that has the value in the name attribute, even if there is something later in the document with the id you asked for.
I once saw a page with a input tag
with a maxlength field set to "2o".
In this specific case, you're talking about invalid code. The maxlength attribute can't contain letters, only numbers.
What browsers do with invalid code varies a great deal, as you can see for yourself.
If you're really asking "what do all the different browsers do when faced with HTML code that, for any one of an infinite number of reasons, is broken?", that way lies madness.
We can reduce the problem space a great deal by using valid code.
So, use valid HTML. Then you are left with two main problem areas:
browser bugs -- how the browser follows the HTML standard and what it does wrong
differences in browser defaults, like the amount of padding/margin it gives to the body
Inconsistent parsing of XHTML in HTML mode
HTML parsers are not designed to handle XML.
If an XHTML document is served as "text/html“ and the compatibilities guidelines are not followed you can get unexpected results.
Empty tags is one possible source of problems. <tag/> and <tag></tag> are equivalent in XML. However the HTML parser can interpret them in two ways.
For instance Opera and IE treat <br></br> as two <br> but Firefox and WebKit treat <br></br> as one <br>.