It seems like you do not have any JavaScript localization files to use with wp_set_script_translations()
. If we consult the Gutenberg/JavaScript documentation for internationalization:
The translation files must be in the JED 1.x JSON format.
[…]
<?php function myguten_set_script_translations() { wp_set_script_translations( 'myguten-script', 'myguten', plugin_dir_path( __FILE__ ) . 'languages' ); } add_action( 'init', 'myguten_set_script_translations' );
WordPress will check for a file in that path with the format
${domain}-${locale}-${handle}.json
as the source of translations. Alternatively, instead of the registered handle you can use the md5 hash of the relative path of the file,${domain}-${locale}
in the form of${domain}-${locale}-${md5}.json
.
Checking the branch you supplied, I do not see any candidate .json
files in the path you called wp_set_script_translations()
with that could be used as JavaScript translations.
Related Posts:
- WordPress: After Gutenberg plugin migration to block.json the localization/ translations with PolyGlot in JavaScript does not work anymore
- get the queried_object of an url
- How to make a WordPress plugin translation ready?
- check if Gutenberg is currently in use
- How to use PanelColorSettings in custom Gutenberg block?
- Custom action button in Gutenberg editor (post_submitbox_misc_actions – equivalent)
- How to provide translations for a WordPress TinyMCE plugin?
- Adding pre-publish checks with Gutenberg
- Managing two editable fields in gutenberg
- How to make repeated component/block in Gutenberg
- How to save block attributes when the output doesn’t change
- How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
- Using Primary Color in Plugin Block
- Gutenberg ServerSideRender is deprecated, how to work with new wp.serverSideRender component?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- lodash dependency in a Gutenberg plugin
- Problems with localization
- Create Element From Dynamic HTML String [closed]
- How does gettext works for translating readme file of plugin?
- `wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin
- Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”
- creating elements/innerblocks via rangecontrol
- What’s the Right Way to get and save remote data for a Gutenberg block?
- Can’t we use strings defined as PHP constants if we want to translate them in a plugin?
- Looking for callback function after Gutenberg is rendered?
- How to Parse an Array of Elements in Gutenberg Block
- use __($str) to translate strings (symfony/twig)
- Plugin Localization
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- Using the component outside the editor. select(‘core’) is null
- Gutenberg is there a way to know if the current block is reusable?
- How to disable “Transform to” option in Gutenberg custom blocks
- Is it possible to check is loaded language files correctly with WordPress plugin?
- How to allow core Gutenberg blocks selection only when you are inside a custom inner block
- Is there a better way to implement responsive images than what WordPress uses by default?
- Gutenberg registerFormatType with Multiple Classes
- Saving data from block editor to the database
- Gutenberg: useDispatch is not a function – @wordpress/data included
- Gutenberg Block add element in the Editor inside InnerBlocks after div – editor-block-list
- Make a list with header and subtext in Gutenberg blocks
- Translate strings not recognised in plugin
- Gutenberg – What is the best way to save/update post meta?
- How do you render_callback for register_block_type to a method in another class?
- How to i18n text coming from the db or from an external source
- How to create multiple Gutenberg blocks in one plugin
- How to get color name in PanelColorSettings in custom Gutenberg block?
- How insert negative values in Gutenberg box-control
- Initial help with official “create a block” tutorial
- Should I always prefer esc_attr_e & esc_html_e instead of _e?
- Should shorcodes in i18n plugins be translated and if so, how?
- Widget translation on my plugin
- Are block templates incompatible with serialize_blocks?
- How do I dynamically render an InnerBlock inside a dynamic block?
- ServerSideRender and Media Object: attributes passing image data object to php renderer even though it’s not set
- Gutenberg Block showing invalid content on edit
- Plugin translations not installed but… strings are translated!
- WordPress Block Development – trouble importing from @wordpress/icons
- Gutenberg blocks not getting styled on back end
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- Is there an additional block.json property to set to get an InnerBlocks child to respect the “supports” property?
- How to setAttributes in Gutenberg block?
- How to access noticeOperations from withNotices
- Run code once when block is created
- Best way to save custom css for an block
- How to prevent UNDO on guternberg block editor
- How to insert text at the current cursor position in Gutenberg?
- How to override gutenberg paragraph block edit property
- How can I listen to events in Gutenberg block?
- It’s possible to passing a ref to FormTokenField from parent component using forwardRef?
- Do I have to worry about useState causing a re-render?
- What’s the right way to instantiate new blocks and/or the plugin itself in toto when using wppb architecture?
- Generate JSON files for language translation from po file without wp-cli i18n make-json
- WP Gutenberg Blocks – How to limit first/root blocks
- Creating a custom Gutenberg block with columns
- How to get boolean value from register_meta properly?
- JSX in WordPress Plugin Development
- ResizableBox with RangeControl not working
- How can I get the selected string when using a toolbar button in Gutenberg?
- jQuery selectors for editor elements safe to use?
- There is a problem in the gutenberg block I developed. Problem is with withInstanceId
- Gutenberg: import dependency or assign from global variable?
- Build a translation correcter plugin
- Translation per IP location [closed]
- Translate slug in WPMU with PO files
- Gutenberg table block with Bootstrap .table class
- Translate MCE button text/tooltip in custom plugin
- How to control an elements classes from multiple Gutenberg sidebar controls?
- How to add a gradient component to a custom block
- How to only load css for used blocks on frontend
- Additional classes `undefined` after saving post in Gutenberg
- How do you submit a Gutenberg plugin?
- esc_html__() and __() not working within arrays
- How to prevent someone from entering strings without making it available for translation?
- Readme.txt seems to be cached but not the version
- Return Value of load_plugin_textdomain
- Catching Gutenberg sidebar switch event
- Translate javascript with WordPress built-in localization API for static strings
- Invalid hook call on save, not edit when using swiper slider
- Proper way to use useSelect
- Use npm and wp-env to make production bundle