- This topic has 11 replies, 2 voices, and was last updated 5 years, 5 months ago by Tom.
December 11, 2016 at 12:31 pm #253662Dani
Do you know if I can translate the plain text I’ve into a Hook with WPML Multilingual Blog version ?
Or with Multilingual CMS version is this posible?
https://about.me/aticbcnDecember 11, 2016 at 6:42 pm #253711TomLead DeveloperLead Developer
You should just need to wrap your text in a translation function like this:
<?php _e('My custom text','generatepress'); ?>December 12, 2016 at 1:51 am #253772Dani
I put the function into the Hook, and activate “Execute PHP”.
I try to do the translation trough .po archives ( I’ve not ” WPML String Translation” plugin installed)
But I search into .po files but don’t find my custom text… I search here (via FTP):
but nothing found.
Where is the text?
What I am doing wrong?
https://about.me/aticbcnDecember 12, 2016 at 10:20 am #253898TomLead DeveloperLead DeveloperDecember 12, 2016 at 3:22 pm #254014Dani
I installed the WPML plugin.
I put the code
<?php _e('My custom text','generatepress'); ?>into a Hook “Before Footer”.
After I go to “WPML -> Theme and plugins localization” and click on “Scan the theme for strings” and after select GP Premium plugin and “Strings in the plugins”, and search news strings.
After I go to the section “WPML String Translation”, but don’t found nothing (my string). I search in this labels:
..and others options but don’t found my string.
How I can found my string?
Can you help me?
My site: http://bit.ly/1UQRoqL
My string: Comparte (Above social buttons)
https://about.me/aticbcnDecember 12, 2016 at 7:33 pm #254077TomLead DeveloperLead DeveloperDecember 12, 2016 at 11:11 pm #254134Dani
I’ve been doing translations for four days. I have translated everything (more than 5000 words, a lot of strings) except what I’ve told you.
It is still in test mode, yes , and excuse me, I gave you the domain but you can not see anything (Maybe I should not have given you the domain of the site, I think probably not necessary).
In the admin I can select between lenguages and do all I explain in the last comment.
I have been able to translate all the strings, except the ones I mentioned above.
Do you really need to see the Language Selector?
https://about.me/aticbcnDecember 12, 2016 at 11:39 pm #254143TomLead DeveloperLead Developer
I’m just trying to get an idea of what’s happening so we can come up with a solution.
Can you point me to the exact plugin you’re using to manage the translations?December 12, 2016 at 11:50 pm #254148Dani
Plugins I’m using:
WPML Sitepress Multilingual cms 3.6.1
WPML Media 2.1.23
WPML String Translation 2.5.1
WPML Transltaion Management 2.2.6
https://about.me/aticbcnDecember 13, 2016 at 12:32 am #254157TomLead DeveloperLead Developer
Searching through their forum, I keep seeing this as “the answer”:
1. Go to WPML->Theme and plugins localization make sure that “Translate the theme and plugins using WPML’s String Translation” option is selected
2. Scroll down and click on “Scan the theme for strings” button
3. After that you will be able to translate string from WPML->String translation
I’m assuming that’s what you’ve tried and it isn’t working.
Have you tried asking in their support forum? They obviously know their plugin a lot better than me, so it might be something really easy that I’m not aware of.
Using GP Hooks, you’re basically hard coding text into your template files (GP Hooks is doing it for you).
From what I’ve seen, using a function like
__(like I mentioned above) should make the text discover-able to WPML, however I could definitely be missing something as I’ve never made a multilingual site.December 13, 2016 at 12:53 am #254161Dani
Ok Tom, don’t worry.
I will ask in the forum of wpml.
I was planning to contact them, but first I should know if I was putting the code inside the Hook and whether this should work.
If I had contacted them first, they would have told me to contact you.
https://about.me/aticbcnDecember 13, 2016 at 12:54 am #254162
- You must be logged in to reply to this topic.