https://github.com/andrewmaksimchuk/checking_input_characters_language
Checking input characters on the language.
https://github.com/andrewmaksimchuk/checking_input_characters_language
Last synced: about 2 months ago
JSON representation
Checking input characters on the language.
- Host: GitHub
- URL: https://github.com/andrewmaksimchuk/checking_input_characters_language
- Owner: AndrewMaksimchuk
- Created: 2021-04-26T16:53:59.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-26T16:55:39.000Z (about 4 years ago)
- Last Synced: 2025-02-06T05:43:30.728Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Checking input language
### Languages:
- English
- Ukraine
- Group of cyrillic languages(only common letters)### Unicode code ranges of characters:
- For English: [ 65 - 90, 97 - 122 ]
- For Cyrillic: [ 1024 - 1279 ]
- For Ukraine: [ 1028, 1030, 1031, 1040 - 1065, 1068, 1070 - 1097, 1100, 1102, 1103, 1108, 1110, 1111, 1168, 1169 ]### Description
Check last input character.
If find English language return ```"English"```,
Ukraine - return ```"Ukraine"```,
check for cyrillic - return ```"Cyrillic"```
and if don\`t find - return ```"I don`t know!"```For checking cyrillic letters need add the third parameter as ```true```
By default this feature disabled.### Example:
``` new InputLang(id_of_input_element, function_callback(language_of_last_input_letter), check_cyrillic_defaut_false); ```### Errors:
- Throw error when missed id of input element
- Throw error when missed callback function