@@ -561,6 +561,7 @@ textual representation in all languages based on the `Unicode CLDR dataset`_::
561
561
562
562
The ``EmojiTransliterator `` also provides special locales that convert emojis to
563
563
short codes and vice versa in specific platforms, such as GitHub, Gitlab and Slack.
564
+ All theses platform are also combined in special locale ``text ``.
564
565
565
566
GitHub Emoji Transliteration
566
567
............................
@@ -607,6 +608,26 @@ Convert Slack short codes to emojis with the ``slack-emoji`` locale::
607
608
$transliterator->transliterate('Menus with :green_salad: or :falafel:');
608
609
// => 'Menus with 🥗 or 🧆'
609
610
611
+ Text Emoji Transliteration
612
+ ..........................
613
+
614
+ Convert Github, Gitlab and Slack emojis to short codes with the ``emoji-text `` locale::
615
+
616
+ $transliterator = EmojiTransliterator::create('emoji-text');
617
+ $transliterator->transliterate('Breakfast with 🥝 or 🥛');
618
+ // => 'Breakfast with :kiwifruit: or :milk-glass:
619
+
620
+ Convert Github, Gitlab and Slack short codes to emojis with the ``text-emoji `` locale::
621
+
622
+ $transliterator = EmojiTransliterator::create('text-emoji');
623
+ // Github short codes
624
+ $transliterator->transliterate('Breakfast with :kiwi-fruit: or :milk-glass:');
625
+ // Gitlab short codes
626
+ $transliterator->transliterate('Breakfast with :kiwi: or :milk:');
627
+ // Slack short codes
628
+ $transliterator->transliterate('Breakfast with :kiwifruit: or :glass-of-milk:');
629
+ // => 'Breakfast with 🥝 or 🥛'
630
+
610
631
Removing Emojis
611
632
~~~~~~~~~~~~~~~
612
633
0 commit comments