Last active
July 11, 2022 18:31
-
-
Save richardDobron/faa29c058615a1a8f50a8acbe7e3ecf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// simple text: | |
echo fbt('Save', 'Button: Save a form or settings'); | |
// text with params: | |
$name = 'Patricia'; | |
$gender = 2; | |
echo fbt( | |
\fbt\fbt::name( | |
'name', | |
'<a href="#">' . $name . '</a>', | |
$gender | |
) . | |
' shared a link. Tell ' . \fbt\fbt::sameParam('name') . ' you liked it.', | |
'Notification about sharing a link.' | |
); | |
// is same as: | |
?> | |
<?php fbtTransform(); ?> | |
<fbt desc="param example"> | |
<fbt:name name="name" gender="<?=$gender?>"> | |
<a href="#"><?=$name?></a> | |
</fbt:name> | |
shared a link. Tell | |
<fbt:same-param name="name" /> | |
you liked it. | |
</fbt> | |
<?php endFbtTransform(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment