Title: plugin internationalization
Last modified: September 15, 2021

---

# plugin internationalization

 *  Resolved [Ahmad Wael](https://wordpress.org/support/users/bbioon/)
 * (@bbioon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/)
 * Hi there,
    I have found a bug in the plugin source code which prevents the translators
   from translating the plugin into other languages.
 * you are using the function `__()` in this way:
 * `__( $text, 'grw' )`
 * the translation applications won’t read this because they don’t run the PHP code
   however it’s needed to be written as a string like this:
 * `__( 'text needs to be translated', 'grw' )`
 * here is a [reference](https://codex.wordpress.org/I18n_for_WordPress_Developers#:~:text=It%20won%27t%20work,will%20look%20like%3A)
   of what I’m talking about
 * I hope I have come clear to you.
 * best regards…
    -  This topic was modified 4 years, 8 months ago by [Ahmad Wael](https://wordpress.org/support/users/bbioon/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Daniel K.](https://wordpress.org/support/users/richplugins/)
 * (@richplugins)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/#post-14899466)
 * Hi [@bbioon](https://wordpress.org/support/users/bbioon/),
 * Sorry, I don’t quite understand what you mean, the $text is a PHP variable which
   has a text and then this text will translate for your local WordPress language(
   if it is different from English). This works and has always worked for all active
   clients.
 * Another point, if your language is not in the plugin and you can help with translation,
   we will gladly add it in the next version! Please write what language you are
   talking about.
 * Thanks!
 *  Thread Starter [Ahmad Wael](https://wordpress.org/support/users/bbioon/)
 * (@bbioon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/#post-14899502)
 * Thank you [@richplugins](https://wordpress.org/support/users/richplugins/) for
   your reply and for your great plugin.
    However, I think I need to explain more
   to you about the issue.
 * The gettext translation applications like POEdit don’t run the PHP code to know
   what is inside the variables in `__( $text, 'grw' )` so it won’t understand what
   is `$text`.
 * I would like you to see this [reference](https://codex.wordpress.org/I18n_for_WordPress_Developers#:~:text=It%20won%27t%20work,will%20look%20like%3A)
   and see what it’s talking about.
 * Also, I would like you to read any translation code from WordPress core or for
   example woocommerce plugin to see how they are managing the translation.
 * If you need to understand more, please let me know.
 * Regards…
 *  Plugin Author [Daniel K.](https://wordpress.org/support/users/richplugins/)
 * (@richplugins)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/#post-14899532)
 * Hi [@bbioon](https://wordpress.org/support/users/bbioon/),
 * Thank you for explanation, now it’s more clear. If I’m correct you need to translate
   the plugin with some automatic tool, but as I said earlier, we have almost any
   translation (please see ‘language’ folder in the root directory of the plugin)
   and even if not, we can happily add it.
 * Thanks!
 *  Thread Starter [Ahmad Wael](https://wordpress.org/support/users/bbioon/)
 * (@bbioon)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/#post-14899555)
 * [@richplugins](https://wordpress.org/support/users/richplugins/) you are welcome.
 * But even when I’m trying to translate through the WordPress.org tool, I cannot
   find all words that needed to be translated, see this [screenshot](https://snipboard.io/EtcINh.jpg)
 * Also, when I’m trying to see any translated language inside the languages folder
   of the plugin. this is what I have seen: [screenshot](https://snipboard.io/fOsGme.jpg)
 * And no more words are available to translate.
 * This means there is a bug in the plugin translation and the translation tools
   cannot see what is words need to be translated.
 * The translation apps need the words to be clearly written as a string, not inside
   a variable, so they can read the text needs to be translated without the need
   to run the code.
 * Only the wpml string translation tool can understand the format you are following
   in the plugin source code.
 * If you need further help, please let me know.
 * Thank you for your quick response.
    Regards…
    -  This reply was modified 4 years, 8 months ago by [Ahmad Wael](https://wordpress.org/support/users/bbioon/).
    -  This reply was modified 4 years, 8 months ago by [Ahmad Wael](https://wordpress.org/support/users/bbioon/).
 *  Plugin Author [Daniel K.](https://wordpress.org/support/users/richplugins/)
 * (@richplugins)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/#post-14910759)
 * Hi [@bbioon](https://wordpress.org/support/users/bbioon/),
 * We have changed all messages as you suggest, but I don’t see it in the translation
   page on wp.org. Also, I’m not sure that this WP translation tool finds all __(‘…’)
   messages and print these on the page, maybe it works only for a readme file and
   translate the description of the plugin.
 * Thanks!
 *  Plugin Author [Daniel K.](https://wordpress.org/support/users/richplugins/)
 * (@richplugins)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/#post-14925619)
 * Please reopen this topic, if it’s still relevant.
 * Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘plugin internationalization’ is closed to new replies.

 * ![](https://ps.w.org/widget-google-reviews/assets/icon-256x256.gif?rev=3152314)
 * [Rich Showcase for Google Reviews](https://wordpress.org/plugins/widget-google-reviews/)
 * [Support Threads](https://wordpress.org/support/plugin/widget-google-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-google-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-google-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-google-reviews/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Daniel K.](https://wordpress.org/support/users/richplugins/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/plugin-internationalization-3/#post-14925619)
 * Status: resolved