Fb:intl-token
From Facebook Developer Wiki
Contents |
Description
Contains an attribute that replaces a token (variable) in the text of an fb:intl tag. This tag must be a direct child of an fb:intl tag.
See fb:intl for more usage notes and examples.
Attributes
| Required | Name | Type | Description | |
| required | name | string | The name of the token that should be replaced with the contents of this tag. Do not include the token delimiters (curly braces by default) in the name. |
|---|
Examples
<fb:intl>You have {number} new messages.
<fb:intl-token name="number">5</fb:intl-token>
</fb:intl>
The token {number} is replaced by the contents of the fb:intl-token tag with the same name.
<fb:intl>Click {here} to continue.
<fb:intl-token name="here">
<a href="...">
<fb:intl description="In 'Click here to continue'">here</fb:intl>
</a>
</fb:intl-token>
</fb:intl>
The link text is translatable, but the link target is not.
Notes
- Each instance of this tag should have a unique name. If the same name is used twice, the interpreter may select either value.
- fb:name and fb:pronoun are specific exceptions, in that you may use them inline for fb:intl, and they do not need to be wrapped by fb:intl-token.
- An fb:intl-token tag with a name that doesn't correspond to a token in the text of the parent fb:intl tag will be ignored.
