Re: Its all described in the handbook
I’m not sure you understand me. I do not mean translating *.php or js files. I’m talking about block content.
For example, I’m creating header using Gutenberg editor and adding a Paragraph block with content: “Yesterday all my trouble seemed so far away”. It is saved in the database.
How can I add this content to a pot file?
Wordpress itself does not (currently) support multilingualism for content. Not at any point. For that, there are plugins like https://wpml.org or https://wordpress.org/plugins/polylang/ – they allow you to do these translations, each in their own way.
Just reading over this and wondering if everyone is on the same page.
@serge-gusev, you said you were building a theme but also said you were saving blocks via the editor. Do you mean that you are developing the theme in the editor but will eventually want to store the block code in your theme templates?
If so, it is possible to localize text strings from the theme. If this is what you’re going for, I can help with that.
Re: but will eventually want to store the block code in your theme templates?
No, I’m going to store data in the database (and scripts) and generate them during the theme activation.
Really, I know to to generate .po files for PHP and JavaScript. I need solution for localization Gutenberg blocks stored in the database.