• Resolved Ahmad Wael

    (@bbioon)


    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 of what I’m talking about

    I hope I have come clear to you.

    best regards…

    • This topic was modified 3 years, 6 months ago by Ahmad Wael.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author richplugins

    (@richplugins)

    Hi @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

    (@bbioon)

    Thank you @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 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 richplugins

    (@richplugins)

    Hi @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

    (@bbioon)

    @richplugins you are welcome.

    But even when I’m trying to translate through the www.remarpro.com tool, I cannot find all words that needed to be translated, see this screenshot

    Also, when I’m trying to see any translated language inside the languages folder of the plugin. this is what I have seen: screenshot

    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 3 years, 6 months ago by Ahmad Wael.
    • This reply was modified 3 years, 6 months ago by Ahmad Wael.
    Plugin Author richplugins

    (@richplugins)

    Hi @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 richplugins

    (@richplugins)

    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.