-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select the language based on pre-existing text (enhancement) #172
Conversation
I don't quite understand the use case for this? What improvement does this bring over reading the lang attribute of the element? |
A range of hex codepoints would be insufficient, in some languages it would be necessary to tave fairly sophisticated regexes or syllable inventories to clearly distinguish languages. Possiblly supplemented by dictionary lookups for comonly occuring wprds in each language. To do it properly and extensobly would be difficult. |
@andjc , yes it would be insufficient to predict the language exactly, but what we can provide is the list of most probable languages in the menu, for quick selection. Also, if there is only one language that uses the predicted script, we can select it by default @Nikerabbit I guess, in many cases, lang attribute is not given by the developer. This enhancement can be an addition to the ime's intelligence in such cases. |
Sorry for such a long delay in replying! :( I'm starting a personal project to go over the old issues and pull requests here, and try to merge or close them. I actually quite like the general idea. It probably won't be very useful for Wikimedia sites, which is our main focus, because we do set the lang attribute almost everywhere on them, but it can be useful on other sites. The explicit ranges may be a bit overkill, too. Perhaps, if the langdb from jquery.uls is available, we can rely on the writing system setting. I'll take another look some time. If anybody has the energy to rebase this in the meantime, it would be nice :) |
Cleaning up very old pull request. Please post a new one if you think it's still useful. |
(Issue #97) Not completely ready.
It adds a 'range' of hex code points to every language listed in inputmethods.js.
Issue: on chrome, works only when the cursor is in text field and you change the tab, and return back to the same tab... strange. On IE, works well.
Tested with hindi, gujarati and punjabi.
Todo: