PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.20
VikAppointments Services Booking Calendar v1.2.20
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / modules / mod_vikappointments_search / languages / handler.php
vikappointments / modules / mod_vikappointments_search / languages Last commit date
handler.php 1 month ago index.html 1 month ago
handler.php
105 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage mod_vikappointments_search
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access to this file
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 VikAppointmentsLoader::import('language.widget');
15
16 /**
17 * Switcher class to translate the VikAppointments Search widget languages.
18 *
19 * @since 1.0
20 */
21 class Mod_VikAppointments_SearchLanguageHandler extends VikAppointmentsLanguageWidget
22 {
23 /**
24 * Checks if exists a translation for the given string.
25 *
26 * @param string $string The string to translate.
27 *
28 * @return string The translated string, otherwise null.
29 */
30 public function translate($string)
31 {
32 $result = null;
33
34 /**
35 * Translations go here.
36 * @tip Use 'TRANSLATORS:' comment to attach a description of the language.
37 */
38
39 switch ($string)
40 {
41 /**
42 * Search module.
43 */
44
45 case 'VIKAPPOINTMENTS_SEARCH_MODULE_TITLE':
46 $result = __('VikAppointments Search', 'vikappointments');
47 break;
48
49 case 'VIKAPPOINTMENTS_SEARCH_MODULE_DESCRIPTION':
50 $result = __('Displays a search form to start the booking process.', 'vikappointments');
51 break;
52
53 case 'VAP_SEARCH_ORIENTATION':
54 $result = __('Orientation', 'vikappointments');
55 break;
56
57 case 'VAP_SEARCH_ORIENTATION_DESC':
58 $result = __('Choose <b>vertical</b> to display one field per line. Choose <b>horizontal</b> to display all the fields within the same line.', 'vikappointments');
59 break;
60
61 case 'VAP_SEARCH_ORI_VERTICAL':
62 $result = __('Vertical', 'vikappointments');
63 break;
64
65 case 'VAP_SEARCH_ORI_HORIZONTAL':
66 $result = __('Horizontal', 'vikappointments');
67 break;
68
69 case 'VAP_SEARCH_EMPLOYEE_FILTER':
70 $result = __('Employee Filter', 'vikappointments');
71 break;
72
73 case 'VAP_SEARCH_EMPLOYEE_FILTER_DESC':
74 $result = __('Choose whether the widget should display only the services assigned to the selected employee. Leave empty to take all the services.', 'vikappointments');
75 break;
76
77 case 'VAP_SEARCH_EMPLOYEE_FILTER_IGNORE':
78 $result = __('- Ignore -', 'vikappointments');
79 break;
80
81 case 'VAP_SEARCH_ADVANCED_SELECT':
82 $result = __('Advanced Dropdown', 'vikappointments');
83 break;
84
85 case 'VAP_SEARCH_ADVANCED_SELECT_DESC':
86 $result = __('Turn on this option to use select2 jQuery plugin to render the widget dropdowns.', 'vikappointments');
87 break;
88
89 case 'VAPANYEMP':
90 $result = __('- Anyone -', 'vikappointments');
91 break;
92
93 case 'VAPFINDAPPOINTMENT':
94 $result = __('Book Now', 'vikappointments');
95 break;
96
97 default:
98 // fallback to parent handler for commons
99 $result = parent::translate($string);
100 }
101
102 return $result;
103 }
104 }
105