Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for block.json #307

Open
ricardodolnl opened this issue Jun 12, 2023 · 0 comments
Open

Support for block.json #307

ricardodolnl opened this issue Jun 12, 2023 · 0 comments

Comments

@ricardodolnl
Copy link

I make custom blocks for Wordpress themes/plugins and I would like to also translate the fields like title and description in the block.json file. It has textdomain support, see: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/

The default make-pot command already supports it as far as I know (https://developer.wordpress.org/cli/commands/i18n/make-pot/).

Example block.json:

{
  "name": "my-plugin/button",
  "title": "Button",
  "description": "A custom button block.",
  "category": "my-plugin-blocks",
  "icon": "block-default",
  "keywords": ["my-plugin", "button"],
  "textdomain": "my-plugin",
  "acf": {
    "mode": "preview",
    "renderTemplate": "block.php"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant