We are building a Multi-Lingual Business Application -- where the user is able to enter values and data in multiple languages.
One of our main use cases is, if a user is editing or adding to a text value or data that is in a different language. For example, the data they are editing could be in Japanese, and the user's current input language is set to English, then when they enter the editing mode, the input language is automatically set to Japanese by us -- programmatically. They can go back to editing English items, and the input language is changed back to English, and similarly, when they come back to edit the Japanese data or some German data, then the input language is again automatically changed to the respective language by the application -- without causing the user to manually go to the settings and change it.
Is there any current way to have this behaviour in MacOS and iOS now?
Please suggest what can be done to achieve the same.
If you are using UIKit
, textInputContextIdentifier is what you are looking for – If you create your own subclass of UITextView
or UITextField
to override textInputContextIdentifier
to return a unique ID, the instances of your text view class will remember the tex input mode.
NSTextView
or NSTexField
doesn't seem to have the same feature unfortunately, and so I’d suggest that you file a feedback report and share your report ID here. Thanks.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.