Skip Navigation

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 Marcel 1 year, 8 months ago.

Author Posts
April 23, 2023 at 7:10 am #13522545

Harald

Tell us what you are trying to do?

Translate a string for email footer in functions.php

Is there any documentation that you are following?

Is there a similar example that we can see?

Here is the code:

function wpf_dev_change_email_footer_text( $footer ) {

$footer = "Posthof | Conrad-Trautson-Str. 4 | 39040 Freienfeld/Trens | Mwst. Nr: 03189140217 | Steuernr.: BNDNDN94T63M067L | info@posthof.it";

return $footer;

}

add_filter( 'wpforms_email_footer_text', 'wpf_dev_change_email_footer_text', 30, 1 );

I need to make the whole string in the variable $footer translatable.

What is the link to your site?

hidden link

April 24, 2023 at 7:30 am #13524719

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

You must add a getText() calls to that string: https://wpml.org/documentation/support/translating-the-theme-you-created/.

For more information, please check the WP Developer Handbook regarding i18n: https://developer.wordpress.org/themes/functionality/internationalization/.

Best Regards
Marcel

The topic ‘[Closed] Translate string for email footer’ is closed to new replies.