PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 4.0.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v4.0.2
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
visualizer / classes / Visualizer / Module / Language.php

Language.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 4.0.2, at classes/Visualizer/Module/Language.php

86 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Language function file for tinymce.
4 *
5 * @link http://themeisle.com
6 * @since 3.0.0
7 */
8 /**
9 *
10 * SECURITY : Exit if accessed directly
11 */
12 if ( ! defined( 'ABSPATH' ) ) {
13 die( 'Direct access not allowed!' );
14 }
15
16 /**
17 *
18 * Translation for TinyMCE
19 */
20
21 if ( ! class_exists( '_WP_Editors' ) ) {
22 require ABSPATH . WPINC . '/class-wp-editor.php';
23 }
24
25 /**
26 * The module for all languages stuff.
27 *
28 * @category Visualizer
29 * @package Module
30 *
31 * @since 1.0.0
32 */
33 class Visualizer_Module_Language extends Visualizer_Module {
34
35 /**
36 * The strings for translation.
37 *
38 * @access protected
39 * @var array $strings The ID of this plugin.
40 */
41 protected $strings;
42
43 /**
44 * Initialize the class and set its properties.
45 *
46 * @since 3.0.0
47 * @access public
48 */
49 public function __construct() {
50 $this->strings = array(
51 'plugin_label' => __( 'Insert Chart', 'visualizer' ),
52 'plugin_title' => __( 'Insert Chart', 'visualizer' ),
53 );
54 }
55
56 /**
57 *
58 * The method that returns the translation array
59 *
60 * @access public
61 * @return string
62 */
63 public function tinymce_translation() {
64
65 $locale = _WP_Editors::$mce_locale;
66 $translated = 'tinyMCE.addI18n("' . $locale . '.visualizer_tinymce_plugin", ' . json_encode( $this->strings ) . ");\n";
67
68 return $translated;
69 }
70
71 /**
72 *
73 * The method that returns the strings array
74 *
75 * @since ?
76 * @access public
77 * @return array
78 */
79 public function get_strings() {
80 return $this->strings;
81 }
82 }
83
84 $visualizerLangClass = new Visualizer_Module_Language();
85 $strings = $visualizerLangClass->tinymce_translation();
86