Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is using WPML to translate Gravity Forms on their website and has resolved the initial issue of enabling translation. However, they now need to send admin notifications to different email addresses based on the language of the form.
Solution:
We recommend using the gform_notification hook to customize the email notifications based on the form's language. Here is an example of how you can implement this:

add_filter( 'gform_notification', 'language_based_notification_email', 10, 3 );
function language_based_notification_email( $notification, $form, $entry ) {
    if ( $notification['name'] == 'Admin Notification' ) {
        $language = apply_filters( 'wpml_current_language', null );
 
        $emails = array(
            'en' => 'admin-en@example.com',
            'de' => 'admin-de@example.com',
            'fr' => 'admin-fr@example.com',
        );
 
        if ( isset( $emails[ $language ] ) ) {
            $notification['toType'] = 'email';
            $notification['to'] = $emails[ $language ];
        }
    }
    return $notification;
}

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 2 replies, has 1 voice.

Last updated by Andreas W. 3 months, 3 weeks ago.

Assisted by: Andreas W..

Author Posts
November 14, 2025 at 12:35 pm #17579067

geoffC-3

Background of the issue:
I am trying to translate Gravity Forms using WPML on my site hidden link. I have the Gravity Forms plugin installed and activated.

Symptoms:
I cannot find any reference to Gravity Forms in the WPML dashboard to enable translation, particularly in the post type translation screen.

Questions:
How can I enable translation for Gravity Forms in WPML?
Why is Gravity Forms not appearing in the post type translation screen?

November 14, 2025 at 1:50 pm #17579382

geoffC-3

I have managed to resolve the main issue, but my question now relates to how I can send the admin notification to different email addresses based upon the language of the form.

Geoff

November 15, 2025 at 2:08 am #17580429

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am glad to hear that you have already found a solution to the issue.

Sending Gravity Forms admin notifications to different email addresses based on the form's language is definitely custom work. WPML and Gravity Forms do not provide this functionality out of the box.

You could try to use this hook for this purpose:
hidden link

Example:

add_filter( 'gform_notification', 'language_based_notification_email', 10, 3 );
function language_based_notification_email( $notification, $form, $entry ) {
    if ( $notification['name'] == 'Admin Notification' ) {
        $language = apply_filters( 'wpml_current_language', null );

        $emails = array(
            'en' => 'admin-en@example.com',
            'de' => 'admin-de@example.com',
            'fr' => 'admin-fr@example.com',
        );

        if ( isset( $emails[ $language ] ) ) {
            $notification['toType'] = 'email';
            $notification['to'] = $emails[ $language ];
        }
    }
    return $notification;
}

Best regards
Andreas