react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Extended IME support for `@internationalized/number`

Open Rocss opened this issue 1 year ago โ€ข 2 comments

Provide a general summary of the feature here

I'm playing around with the @internationalized/number and I want to insert numbers using Hindi keyboard. I observed that @internationalized/number allows 'latn', 'arab', 'hanidec' numeric systems, and it works well for arabic keyboard, but it does not work for Hindi keyboard.

๐Ÿค” Expected Behavior?

It would be nice to be able to enter numbers using the Hindi - standard and Bengali - standard the same way it works for 'latn', 'arab' and 'hanidec' right now.

๐Ÿ˜ฏ Current Behavior

Nothing happens when I type in the number field (which uses @internationalized/number ) using Hindi keyboard.

๐Ÿ’ Possible Solution

Adding deva and beng here: https://github.com/adobe/react-spectrum/blob/main/packages/%40internationalized/number/src/NumberParser.ts#L26 would support Hindi and Bengali IME

Screenshot 2024-05-10 at 12 05 29

๐Ÿ”ฆ Context

This request comes from our g18n team. Adobe Express supports a large range of languages. We want to provide users the complete experience by allowing to use the corresponding IME for the language selected. That would be Japanese, Korean, Simplified Chinese, Traditional Chinese, Hindi, Thai, Bengali, Tamil as the main ones with complex scripts.

๐Ÿ’ป Examples

No response

๐Ÿงข Your Company/Team

Adobe Express

๐Ÿ•ท Tracking Issue

No response

Rocss avatar Jun 26 '24 09:06 Rocss

A side note here would be that in Spectrum Web Components, (which uses @internationalized/number) we resolved the double-byte characters support, therefore Japanese works there. I am not sure if this can be resolved in the @internationalized/number, but anyway it is not a priority.

Rocss avatar Jun 26 '24 09:06 Rocss

Hi, can you please reach out internally, we have a conversation going about adding numbering systems already.

snowystinger avatar Jun 26 '24 10:06 snowystinger