__( 'Translations', 'swiftling' ), 'title' => __( 'Forms', 'swiftling' ), 'description' => __( 'The texts of your forms: labels, choices, buttons and messages. A form is translated once and shows in every page it is on.', 'swiftling' ), ) ); if ( ! $swiftling_languages['targets'] ) { Ui::emptyState( __( 'Choose the languages first', 'swiftling' ), __( 'Content is translated into the languages you choose.', 'swiftling' ), array( __( 'Add languages', 'swiftling' ), admin_url( 'admin.php?page=swiftling-languages' ) ) ); return; } $swiftling_not_listed = add_query_arg( array( 'page' => 'swiftling-forms', 'help' => 'not-listed', ), admin_url( 'admin.php' ) ); // The forms of every form plugin on the site, by plugin, and their state in every language. $swiftling_forms = array(); $swiftling_plugins = 0; foreach ( $swiftling_providers as $swiftling_provider ) { $swiftling_found = $swiftling_provider->forms(); if ( ! $swiftling_found ) { continue; } ++$swiftling_plugins; foreach ( $swiftling_found as $swiftling_form ) { $swiftling_forms[] = array_merge( $swiftling_form, array( 'plugin' => $swiftling_provider->name() ) ); } } if ( ! $swiftling_forms ) { echo '
name() ); ?>
__( 'A form built into a page with the block editor, Divi or Elementor is not listed here. Its texts are part of that page, so you translate them in the page’s own editor.', 'swiftling' ), 'compact' => true, ) ); Ui::button( __( 'My form is not listed', 'swiftling' ), 'secondary', $swiftling_not_listed ); ?>