WPML
PHP
wpml_st_force_translate_admin_options

Description

WPML allows you to translate entries from the wp_options table. We call these Admin Texts.

To avoid confusion, when the user is editing these settings in the dashboard, these options aren’t translated in admin.

But we sometimes require translating them, even in admin. For example, when sending an email from the dashboard.

Arguments

The only required argument is an array of strings where each string is the name of an admin text.

Example Usage

Translating the header and footer of an email sent from the WordPress adminPHP
if ( $sending ) {
   do_action( 'wpml_st_force_translate_admin_options', array( 'email_header', 'email_footer' ) );
}