@@ -560,7 +560,7 @@ textual representation in all languages based on the `Unicode CLDR dataset`_::
560
560
561
561
562
562
The ``EmojiTransliterator `` also provides special locales that convert emojis to
563
- short codes and vice versa in specific platforms, such as GitHub and Slack.
563
+ short codes and vice versa in specific platforms, such as GitHub, Gitlab and Slack.
564
564
565
565
GitHub Emoji Transliteration
566
566
............................
@@ -577,6 +577,21 @@ Convert GitHub short codes to emojis with the ``github-emoji`` locale::
577
577
$transliterator->transliterate('Teenage :turtle: really love :pizza:');
578
578
// => 'Teenage 🐢 really love 🍕'
579
579
580
+ Gitlab Emoji Transliteration
581
+ ............................
582
+
583
+ Convert Gitlab emojis to short codes with the ``emoji-gitlab `` locale::
584
+
585
+ $transliterator = EmojiTransliterator::create('emoji-gitlab');
586
+ $transliterator->transliterate('Breakfast with 🥝 or 🥛');
587
+ // => 'Breakfast with :kiwi: or :milk:'
588
+
589
+ Convert Gitlab short codes to emojis with the ``gitlab-emoji `` locale::
590
+
591
+ $transliterator = EmojiTransliterator::create('gitlab-emoji');
592
+ $transliterator->transliterate('Breakfast with :kiwi: or :milk:');
593
+ // => 'Breakfast with 🥝 or 🥛'
594
+
580
595
Slack Emoji Transliteration
581
596
...........................
582
597
@@ -693,7 +708,7 @@ with the slugger to transform any emojis into their textual representation::
693
708
// $slug = 'un-chat-qui-sourit-chat-noir-et-un-tete-de-lion-vont-au-parc-national';
694
709
695
710
If you want to use a specific locale for the emoji, or to use the short codes
696
- from GitHub or Slack, use the first argument of ``withEmoji() `` method::
711
+ from GitHub, Gitlab or Slack, use the first argument of ``withEmoji() `` method::
697
712
698
713
use Symfony\Component\String\Slugger\AsciiSlugger;
699
714
0 commit comments