The npm library (mirrored at https://github.com/wikimedia/mediawiki-libs-LangConv, hosted on gerrit ) is imported by Parsoid/JS to support the html2html language conversion API endpoints.
This library provides the following:
- FST specs for various language variant conversions (the .foma files)
- JS tools to compile FST specs into programming-language-neutral FST representations. (.att files are the compiled representation)
- FST.js, the FST runner script that Parsoid imports to process input text through compiled programming-language-neutral FST representations in .att files
This phab task is about porting the FST.js runner to FST.php. This ported version should be part of the wikimedia-langconv repository. But, before this code can be used in Parsoid/PHP, we need T225023: Convert wikimedia-langconv npm library into a dual npm / composer library repo resolved.