We have just released WPML 4.3.3. Before reporting issues please make sure to update - this version resolves all known issues with the major WPML 4.3 release

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

Problem: Unable to translate string in function.php of my child theme. This code has been added in the function.php of my child theme, WPML don't find the string.

Solution: Solution here: https://wpml.org/forums/topic/translate-strings-function-php-child-theme/#post-2207051

This topic contains 2 replies, has 2 voices.

Last updated by genevieveR-2 1 year, 5 months ago.

Assigned support staff: Noman.

Author Posts
May 21, 2018 at 4:07 pm #2202652

genevieveR-2

Tell us what you are trying to do?

I try to translate these strings in function.php of my child theme 'I am looking for a job!' and 'I have jobs to offer!'.

This code has been add in the function.php of my child theme, WPML don t find the string

function custom_jobify_registration_role_candidate() {
return 'I am looking for a job!';
}
add_filter( 'jobify_registration_role_candidate', 'custom_jobify_registration_role_candidate' );

function custom_jobify_registration_role_employer() {
return 'I have jobs to offer!';
}
add_filter( 'jobify_registration_role_employer', 'custom_jobify_registration_role_employer' );

Is there any documentation that you are following?
hidden link

What is the link to your site

hidden link

I can sent you an access if needed

May 22, 2018 at 10:27 am #2207051

Noman
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML Support. I have wrap the string in the gettext functions __() with a text domain like 'themedomain’. Please use updated code:

function custom_jobify_registration_role_candidate() {
return __('I am looking for a job!', 'themedomain');
}
add_filter( 'jobify_registration_role_candidate', 'custom_jobify_registration_role_candidate' );

function custom_jobify_registration_role_employer() {
return __('I have jobs to offer!', 'themedomain');
}
add_filter( 'jobify_registration_role_employer', 'custom_jobify_registration_role_employer' );

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

Thank you

May 25, 2018 at 2:12 am #2226560

genevieveR-2

Thanks you soo much you really resolve my issue !!