| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | namespace SRFM\Inc; |
| 10 | 10 | |
| 11 | +use SRFM\Inc\Compatibility\Multilingual\String_Translator; | |
| 11 | 12 | use SRFM\Inc\Database\Tables\Entries; |
| 12 | 13 | use SRFM\Inc\Traits\Get_Instance; |
| 13 | 14 | |
| 14 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -254,8 +255,12 @@ | ||
| 254 | 255 | |
| 255 | 256 | // Get the scheduling state and appropriate message. |
| 256 | 257 | $scheduling_state = self::get_form_scheduling_state( $form_restriction ); |
| 257 | 258 | $form_restriction_message = self::get_restriction_message_by_state( $scheduling_state, $form_restriction ); |
| 259 | + | |
| 260 | + // Translate the restriction message via the active multilingual provider | |
| 261 | + // (no-op when no WPML/Polylang is installed). | |
| 262 | + $form_restriction_message = String_Translator::get_instance()->translate_restriction_message( (int) $form_id, $form_restriction_message ); | |
| 258 | 263 | |
| 259 | 264 | $form_restriction_message = apply_filters( 'srfm_form_restriction_message', $form_restriction_message, $form_id, $form_restriction ); |
| 260 | 265 | |
| 261 | 266 | ob_start(); |