Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is building a custom block theme with custom Gutenberg blocks, including dynamic blocks with PHP render callbacks and client-side blocks. They need to integrate WPML for translations and support multiple English locales, specifically British (en-GB) and American (en-US).
Solution:
If you're developing a custom block theme with both dynamic and client-side Gutenberg blocks and need to integrate WPML for translations, we recommend you follow these steps:
1. Review the Developers Information guide for general support on integrating WPML: https://wpml.org/documentation/support/
2. To make your custom Gutenberg blocks translatable, consult the guide on how to Make Custom Gutenberg Blocks Translatable: https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/
For setting up multiple English locales such as British English (en-GB) and American English (en-US), you can configure these within the WPML language settings.

If this solution doesn't look relevant to your situation, please open a new support ticket in our forum: WPML support forum

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 6 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
December 4, 2023 at 12:41 am #14981645

alenM-6

Hi,

I am currently finishing the build of a custom block theme. It uses custom gutenberg blocks we developed, html templates, parts and template parts, which store some content in them too. Most of the blocks are dynamic, so having php render callbacks, but few are client side blocks.

How do we integrated WPML to allow for translations?

Also, how do we have both british en-GB and US , en-US locales?

Thank you,
Alen

December 4, 2023 at 12:15 pm #14986547

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Alen,

Thank you for contacting the support.

I'll recommend checking the following guides:

- Developers Information: https://wpml.org/documentation/support/
- Make Custom Gutenberg Blocks Translatable: https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

Regards.