You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The I18N part of Gutenberg is pretty much in flux and not really documented. Nevertheless, I think we should enhance a scaffolded block so people don't have to worry about internationalisation — or at least point them into the right direction.
This includes:
Not using __() in the save callback as that doesn't work.
Using @wordpress/babel-plugin-makepot to create a POT file of all translatable strings.
Using wp_add_inline_script() and gutenberg_get_jed_locale_data() to load the translations.
Ideally: using pot-to-php or something similar to get a POT file that creates both the translatable strings from the JS, as well as from the PHP side of things.
The text was updated successfully, but these errors were encountered:
While working on https://github.com/swissspidy/gutenberg-i18n-block I realized that even though the generated block uses
wp.i18n
, it can't be translated.The I18N part of Gutenberg is pretty much in flux and not really documented. Nevertheless, I think we should enhance a scaffolded block so people don't have to worry about internationalisation — or at least point them into the right direction.
This includes:
__()
in thesave
callback as that doesn't work.@wordpress/babel-plugin-makepot
to create a POT file of all translatable strings.wp_add_inline_script()
andgutenberg_get_jed_locale_data()
to load the translations.pot-to-php
or something similar to get a POT file that creates both the translatable strings from the JS, as well as from the PHP side of things.The text was updated successfully, but these errors were encountered: