PluginProbe
Translate and Go multilingual – Automatic AI translation – wpLingua / 2.12.1
Translate and Go multilingual – Automatic AI translation – wpLingua v2.12.1
2.16.7 2.16.6 2.16.5 2.16.4 2.16.3 2.16.2 2.16.1 2.16.0 2.15.2 2.15.1 2.15.0 2.14.3 2.14.2 2.14.1 2.14.0 2.13.1 2.13.0 2.12.3 2.12.2 2.12.1 trunk 1.0.3 1.0.4 1.0.5 1.1.0 All 112 releases
wplingua / inc / admin / option-page-exclusions.php

option-page-exclusions.php in Translate and Go multilingual – Automatic AI translation – wpLingua 2.12.1, at inc/admin/option-page-exclusions.php

79 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // If this file is called directly, abort.
4 if ( ! defined( 'WPINC' ) ) {
5 die;
6 }
7
8
9 /**
10 * Print HTML Option page : wpLingua Exclusions
11 *
12 * @return void
13 */
14 function wplng_option_page_exclusions() {
15 ?>
16
17 <h1 class="wplng-option-page-title"><span class="dashicons dashicons-translation"></span> <?php esc_html_e( 'wpLingua - Exclusion rules', 'wplingua' ); ?></h1>
18
19 <div class="wrap">
20 <hr class="wp-header-end">
21 <form method="post" action="options.php">
22 <?php
23 settings_fields( 'wplng_exclusions' );
24 do_settings_sections( 'wplng_exclusions' );
25 ?>
26 <table class="form-table wplng-form-table">
27 <tr>
28 <th scope="row"><span class="dashicons dashicons-admin-links"></span> <?php esc_html_e( 'Exclude URL', 'wplingua' ); ?></th>
29 <td>
30 <fieldset>
31 <label for="wplng_excluded_url"><strong><?php esc_html_e( 'Exclude URL from translation: ', 'wplingua' ); ?></strong></label>
32
33 <hr>
34
35 <p><?php esc_html_e( 'You can exclude from translations pages you wish to offer only in the website\'s original language. To do this, list the REGEXs that match the URL to be excluded, one per line. Examples: ', 'wplingua' ); ?></p>
36
37 <ul>
38 <li><code>^/my-page/$</code> - <?php esc_html_e( 'Exclude URL "/my-page/"', 'wplingua' ); ?></li>
39 <li><code>^/my-page/</code> - <?php esc_html_e( 'Exclude URL starting with "/my-page/"', 'wplingua' ); ?></li>
40 <li><code>/my-page/$</code> - <?php esc_html_e( 'Exclude URL ending with "/my-page/"', 'wplingua' ); ?></li>
41 <li><code>/my-page/</code> - <?php esc_html_e( 'Exclude URL containing "/my-page/"', 'wplingua' ); ?></li>
42 </ul>
43 <br>
44 <textarea name="wplng_excluded_url" id="wplng_excluded_url" rows="6"><?php echo esc_textarea( get_option( 'wplng_excluded_url' ) ); ?></textarea>
45 </fieldset>
46 </td>
47 </tr>
48 <tr>
49 <th scope="row"><span class="dashicons dashicons-welcome-widgets-menus"></span> <?php esc_html_e( 'Exclude elements', 'wplingua' ); ?></th>
50 <td>
51 <fieldset>
52 <label for="wplng_excluded_selectors"><strong><?php esc_html_e( 'Exclude HTML elements: ', 'wplingua' ); ?></strong></label>
53
54 <hr>
55
56 <p><?php esc_html_e( 'You can leave some elements of your web pages untranslated. To do this, list below the CSS selectors for the elements to be excluded, one per line. Examples: ', 'wplingua' ); ?></p>
57
58 <ul>
59 <li><code>#website-main-title</code> - <?php esc_html_e( 'Exclude elements by ID attribute', 'wplingua' ); ?></li>
60 <li><code>.author-name</code> - <?php esc_html_e( 'Exclude elements by class attribute', 'wplingua' ); ?></li>
61 <li><code>.entry-content pre</code> - <?php esc_html_e( 'Exclude elements by CSS selector', 'wplingua' ); ?></li>
62 </ul>
63 <br>
64 <textarea name="wplng_excluded_selectors" id="wplng_excluded_selectors" rows="6"><?php echo esc_textarea( get_option( 'wplng_excluded_selectors' ) ); ?></textarea>
65 </fieldset>
66 </td>
67 </tr>
68 <tr class="wplng-tr-submit">
69 <th scope="row"><span class="dashicons dashicons-yes-alt"></span> <?php _e( 'Save', 'wplingua' ); ?></th>
70 <td>
71 <?php submit_button(); ?>
72 </td>
73 </tr>
74 </table>
75 </form>
76 </div>
77 <?php
78 }
79