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!
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…
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!
@richplugins you are welcome.
But even when I’m trying to translate through the ww.wp.xz.cn 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 4 years, 8 months ago by
Ahmad Wael.
-
This reply was modified 4 years, 8 months ago by
Ahmad Wael.
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!
Please reopen this topic, if it’s still relevant.
Thanks!