Feature request: Replaceable support for Transliterator
tavianator opened this issue · 10 comments
ICU has a Replaceble interface that can be passed to Transliterator if you want to keep track of where the changes happen. It would be great if custom Replaceable implementations could be provided rather than just strings.
Well, I was thinking as a Python class that implements methods for the various Replaceable functions. Open to suggestions.
This feature is now implemented in HEAD. Please, check it out and let me know if it works as expected for you. I, so far, only added PythonReplaceable support in the Transliterator methods that accept it. If there are other such methods accepting Replaceable you'd like support added for, please let me know. Thanks !
I forgot to mention that I also added a test that shows how to create your own python implementation of a Replaceable, wrap it for ICU with PythonReplaceable and use it with a Transliterator instance.
Great, thanks! I'll try it out.
Just tried this out, it appears to work. Thanks!
released in PyICU 2.4