googlei18n/myanmar-tools
A PHP library from Google i18n for working with Myanmar text. It detects Zawgyi versus Unicode, converts between the two encodings, and normalizes Burmese text for reliable display, search, and sorting. Useful for cleaning user input and migrating legacy Zawgyi data.
Architecture fit
ZawgyiDetector (returns a 0.0–1.0 probability that a string is Zawgyi-One rather than Unicode) and Rabbit (converts Zawgyi-One → Unicode). Conversion is one-directional; there is no supported Unicode → Zawgyi path, which constrains any "round-trip" requirement.Integration feasibility
composer require googlei18n/myanmar-tools, wrap in a singleton service, bind in a provider, call from validation rules, model mutators, import pipelines, or middleware.Technical risk
php constraints almost certainly predate PHP 8.2/8.3 and will likely conflict with a current Laravel 10/11 dependency graph. Expect to fork, relax constraints, and run the PHP test suite ourselves before we can rely on it.NOASSERTION; the upstream repo is Apache-2.0. Apache-2.0 is commercially safe, but the flag will block release gates until legal clears it in writing. Budget a week, not a day.composer install --no-dev, CI artifact packaging, and Docker layer copies; a missing model is a silent accuracy collapse, not a crash.Key questions
Stack fit
FormRequest custom rule (detect-and-reject or detect-and-normalize), Eloquent mutators/observers for write-time normalization, queued jobs for bulk backfill, and Laravel Scout indexers to normalize before indexing so search matches both encodings.Migration path
*_raw column.Compatibility
--ignore-platform-reqs in production. Relaxing constraints locally is a one-line change and removes the upgrade dead-end.preg_match('/[\x{1000}-\x{109F}\x{AA60}-\x{AA7F}]/u')) so non-Myanmar traffic pays near-zero cost.MyanmarText service and never call the vendor classes directly — that isolates us from an unmaintained dependency.Sequencing
License clearance and the fork both precede any production code. Detection accuracy measurement precedes conversion rollout. Backfill precedes removing legacy display workarounds. Do not parallelize Phase 1 and Phase 2; the shadow-mode data is the whole point.
Maintenance
Support
Scaling
Failure modes
Ramp-up
*_raw column permanently so a bad threshold is a config rollback rather than a data-loss incident.How can I help you explore Laravel packages today?