This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Noman 1 month, 1 week ago.

Assigned support staff: Noman.

Author Posts
September 3, 2019 at 5:01 pm #4506501

cynthia-paulinaV

Hello, i was wondering how can i translate a word and link from the header-menu.php file... its not in the TRANSLATE STRINGS section... thanks!!!

The file is found in wp-content/themes/salient/includes/partials/header/header-menu.php

Thanks

September 3, 2019 at 5:14 pm #4506537

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. You need to wrap the string in the gettext functions __() with a text domain like 'themedomain’ as follows:

__('Your string goes here', 'themedomain');

Then, scan the theme again in WPML >> Theme and plugins localization and translate this string under WPML >> String Translation

Here are docs for more details:
https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

Please let me know if this resolves your issue or you need further assistance with this issue.

Thank you

The topic ‘[Closed] Translate a string from header dot php’ is closed to new replies.