diff --git a/docs/how-to-guides/themes/block-theme-overview.md b/docs/how-to-guides/themes/block-theme-overview.md index 4a8e109639c00..3507fa00a7fcb 100644 --- a/docs/how-to-guides/themes/block-theme-overview.md +++ b/docs/how-to-guides/themes/block-theme-overview.md @@ -105,6 +105,7 @@ As we're still early in the process, the number of blocks specifically dedicated - Query - Query Loop - Query Pagination +- Pattern - Post Title - Post Content - Post Author @@ -124,6 +125,46 @@ As we're still early in the process, the number of blocks specifically dedicated One of the most important aspects of themes (if not the most important) is the styling. While initially you'll be able to provide styles and enqueue them using the same hooks themes have always used, the [Global Styles](/docs/how-to-guides/themes/theme-json.md) effort will provide a scaffolding for adding many theme styles in the future. +## Internationalization (i18n) + +A pattern block can be used to insert translatable content inside a block template. Since those files are php-based, there is a mechanism to mark strings for translation or supply dynamic URLs. + +#### Example + +Register a pattern: + +```php + __( 'Wordpress credit', 'myblocktheme' ), + 'content' => ' + +
' . + sprintf( + /* Translators: WordPress link. */ + esc_html__( 'Proudly Powered by %s', 'myblocktheme' ), + 'WordPress' + ) . '
+ ', + 'inserter' => false + ) +); +``` + +Load the pattern in a template or template part: + +```html + +