Skip to content

Commit 92bf5c8

Browse files
committed
-
1 parent b7c2ab2 commit 92bf5c8

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

string.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,8 @@ Convert Slack short codes to emojis with the ``slack-emoji`` locale::
613613
$transliterator->transliterate('Menus with :green_salad: or :falafel:');
614614
// => 'Menus with 🥗 or 🧆'
615615

616+
.. _string-text-emoji:
617+
616618
Universal Emoji Short Codes Transliteration
617619
###########################################
618620

@@ -657,11 +659,15 @@ actual emoji thanks to the :ref:`emojify filter <reference-twig-filter-emojify>`
657659
{{ 'My :turtle: loves to eat :green_salad:'|emojify('slack') }}
658660
{# renders: My 🐢 loves to eat 🥗 #}
659661
660-
{# if you are not sure about how the emojis were transliterated, you can
661-
use the 'text' catalog, which merges Slack, GitHub and GitLab text codes #}
662-
{{ 'I like :kiwi-fruit:'|emojify('text') }} {# renders: I like 🥝 #}
663-
{{ 'I like :kiwi:'|emojify('text') }} {# renders: I like 🥝 #}
664-
{{ 'I like :kiwifruit:'|emojify('text') }} {# renders: I like 🥝 #}
662+
If you are not sure about how the emojis were transliterated, you can use the
663+
:ref:`text-emoji catalog <string-text-emoji>`, which merges the emoji text codes
664+
of all services:
665+
666+
.. code-block:: twig
667+
668+
{{ 'I like :kiwi-fruit:'|emojify('text-emoji') }} {# renders: I like 🥝 #}
669+
{{ 'I like :kiwi:'|emojify('text-emoji') }} {# renders: I like 🥝 #}
670+
{{ 'I like :kiwifruit:'|emojify('text-emoji') }} {# renders: I like 🥝 #}
665671
666672
Removing Emojis
667673
~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)