• Hi, I´ve tried to use the language files .po or .mo for translation of some labels that could be set in the plugin settings.
    For example the $settings[‘process_label’] “Processing”.
    But if I leave the Processing Submission Label field empty, I don´t get the translation from the .mo file but an empty submit button.
    How do I make the setable fields translatable?
    Regards Geisi

    https://wordpress.org/plugins/ninja-forms/

Viewing 1 replies (of 1 total)
  • Hello! Thanks for using Ninja Forms. Here’s one method to achieve this by using a hook.

    function mytheme_translate_ninja_forms( $data, $field_id ){
    
      $data['label'] = __($data['label']);
      $data['default_value'] = __($data['default_value']);
      return $data;
    }
    add_filter( 'ninja_forms_field', 'mytheme_translate_ninja_forms', 10, 2 );

    Then you can translate the strings with WPML String translation.

Viewing 1 replies (of 1 total)

The topic ‘Label settings’ is closed to new replies.