sage-acf-wp-blocks
sage-acf-wp-blocks copied to clipboard
Translatable
Could we do something like this in order to make the block title translatable?
{{-- Title: __('My custom block') Description: __('This is my custom block!') --}}
If translation is a must, you could add a filter:
add_filter('sage/blocks/my-custom-block/register-data', function ($data) {
$data['title'] = __('My custom block title', 'sage');
$data['description'] = __('My custom block description', 'sage');
return $data;
});
As an alternative, you can use the acf/register_block_type_args
filter in the same way if you want to add translations in only one function.