Site logo

Archived topic

Text in Hooks translation

11 replies · Started by Dani on December 11, 2016

Viewing posts 1–12 of 12

Hi Tom,

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?

Thanks!
Dani

Hi Tom,

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):

wp-content/lenguages/es_Es.po
wp-contebt/lenguages/themes/generatepress-es_Es.po
but nothing found.

Where is the text?
What I am doing wrong?
Thanks!
Dani

I think you would need a plugin like WPML installed.

All of the translation files for GP are done through WordPress.org.

Hi Tom

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:
generatepress
generate-hooks
gp-premium
text_domain
..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)

Thanks!
Dani

Hmm, is this website multi language? So you can switch between two languages?

Tom,

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?
Thanks
Dani

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?

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

Thanks

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 _e or __ (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.

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.

Thanks
Dani

They probably still will, but hopefully they'll have some more info/instructions for us :)

This archived topic is closed to new replies.