Skip to content

Commit 5d1003a

Browse files
support i18n
1 parent adc0c03 commit 5d1003a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Traits/Has_Blocks.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public function register_blocks(): void {
5858
} else {
5959
register_block_type( $directory );
6060
}
61+
62+
// Load translations.
63+
wp_set_script_translations( 'bm-block-' . $name, 'bm-block-library', static::get_path( 'languages/' ) );
6164
}
6265
}
6366

0 commit comments

Comments
 (0)