tintnaingwin/myanfont

Laravel Zawgyi <=> Unicode Package

v3.1.1 2023-02-26 11:12 UTC

This package is auto-updated.

Last update: 2024-03-26 13:40:54 UTC


README

Latest Version on Packagist Laravel 9.x Laravel 10.x Total Downloads License

Requirements

version-3.*

version-2.*

version-1.*

version-0.*

Read the extensive documentation on version 0.x and on version 1.x.

Installation

You can install this package via composer using this command:

composer require tintnaingwin/myanfont:"~3.0"

The package will automatically register itself.

Usage

Using the facade

  • Unicode to Zawgyi
MyanFont::uni2zg('ဥုံတလဲလဲဖွတလဲလဲ'); // ဥဳံတလဲလဲဖြတလဲလဲ
MyanFont::uni2zg('ဥုံတလဲလဲဖွတလဲလဲ'); // ဥဳံတလဲလဲဖြတလဲလဲ
  • Zawgyi to Unicode
MyanFont::zg2uni('ဥဳံတလဲလဲဖြတလဲလဲ'); // ဥုံတလဲလဲဖွတလဲလဲ
MyanFont::zg2uni('ဥဳံတလဲလဲဖြတလဲလဲ'); // ဥုံတလဲလဲဖွတလဲလဲ
  • Detect Font
// zawgyi
MyanFont::isZgOrUni('ခ်ယ္ရီ'); // output - zawgyi

// unicode
MyanFont::isZgOrUni('ချယ်ရီ'); // output - unicode

Using with Helpers

  • Unicode to Zawgyi
uni2zg('ဥုံတလဲလဲဖွတလဲလဲ'); // ဥဳံတလဲလဲဖြတလဲလဲ
  • Zawgyi to Unicode
zg2uni('ဥဳံတလဲလဲဖြတလဲလဲ'); // ဥုံတလဲလဲဖွတလဲလဲ
  • Detect Font
isZgOrUni('ခ်ယ္ရီ'); // output - zawgyi

Testing

You can run the tests with:

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.