Skip to content

Commit

Permalink
Add note about l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Jul 3, 2024
1 parent fe484e0 commit fe5cca2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/reference-guides/block-api/block-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ Starting with version 6.7, it is possible to specify a PHP file in `block.json`
{ "variations": "file:./variations.php" }
```

That PHP file is expected to `return` an array that contains the block variations. For example:
That PHP file is expected to `return` an array that contains the block variations. Strings found in the variations returned from the PHP file will not be localized automatically; instead, use the `__()` function as usual.

For example:

```php
<?php
Expand Down

0 comments on commit fe5cca2

Please sign in to comment.