Title: Issue with Translatable Strings in Gutenberg Block using __ Function
Last modified: July 14, 2024

---

# Issue with Translatable Strings in Gutenberg Block using __ Function

 *  [Akhtarujjaman Shuvo](https://wordpress.org/support/users/mdshuvo/)
 * (@mdshuvo)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-translatable-strings-in-gutenberg-block-using-__-function/)
 * Hi [@timwhitlock](https://wordpress.org/support/users/timwhitlock/), thanks for
   the awesome plugin! I have been using it for a long time.
 * Today, I was developing a Gutenberg block and generated a `.pot` file using `
   wp i18n make-pot`. The file at `languages/plugin.pot` includes all the translatable
   strings from `index.js`, `edit.js`, etc.
 * However, LocoTranslate is not able to translate those files.
 * Are you aware of this issue?
 * I am including some code below:
 *     ```wp-block-code
       // index.js<span style="font-family: inherit; font-size: 0.8rem;">import { __ } from '@wordpress/i18n';</span><span style="font-family: inherit; font-size: 0.8rem;">import { PanelBody, ToggleControl } from '@wordpress/components';</span><span style="font-family: inherit; font-size: 0.8rem;"></span>// Return Edit component<InspectorControls>	<PanelBody title={ __( 'Settings', 'plugin' ) }>		<ToggleControl			label={ __( 'Fixed width table cells', 'plugin' ) }			checked={ hasFixedLayout }			onChange={ ( value ) =>				setAttributes( { hasFixedLayout: value } )			}		/>		<ToggleControl			label={ __( 'Hide Table Title', 'plugin' ) }			checked={ hideTableTitle }			onChange={ ( value ) =>				setAttributes( { hideTableTitle: value } )			}		/>	</PanelBody></InspectorControls>
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-translatable-strings-in-gutenberg-block-using-__-function/#post-17889844)
 * Can you please clarify “not able to translate”?
 * (1) If the strings are extracted to your POT, then open your PO file and “Sync”
   from the POT. Do the strings appear editable in the editor?
 * (2) When you save the PO, you should get JSON files generated for your JS translations.
   Does this work?

Viewing 1 replies (of 1 total)

The topic ‘Issue with Translatable Strings in Gutenberg Block using __ Function’
is closed to new replies.

 * ![](https://ps.w.org/loco-translate/assets/icon-256x256.png?rev=1000676)
 * [Loco Translate](https://wordpress.org/plugins/loco-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/loco-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/loco-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/loco-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/loco-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/loco-translate/reviews/)

## Tags

 * [gutenberg](https://wordpress.org/support/topic-tag/gutenberg/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-translatable-strings-in-gutenberg-block-using-__-function/#post-17889844)
 * Status: not resolved