For reference see T383216: Use a configurable Alphabet to generate backlink markers in Cite (legacy) and the work done in [1]
Implementation details:
- Adapt the code introduced in [1] to be reusable between Parsoid and the legacy parser.
- Should be backwards compatible with the current mechanism where a i18n message is used: the PHP configuration feature flag will switch between numeric+legacy-i18n backlink markers, or the entirely new mechanism.
- Add tests
[1] https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/1111359