PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / modules / mod_vikappointments_zip / languages / handler.php
vikappointments / modules / mod_vikappointments_zip / languages Last commit date
handler.php 5 days ago index.html 5 days ago
handler.php
89 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage mod_vikappointments_zip
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 ZIP Checker widget languages.
18 *
19 * @since 1.0
20 */
21 class Mod_VikAppointments_ZipLanguageHandler 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 * ZIP Checker module.
43 */
44
45 case 'VIKAPPOINTMENTS_ZIP_CHECKER_MODULE_TITLE':
46 $result = __('VikAppointments ZIP Checker', 'vikappointments');
47 break;
48
49 case 'VIKAPPOINTMENTS_ZIP_CHECKER_MODULE_DESCRIPTION':
50 $result = __('Widget used to validate the ZIP codes of the customers (for home delivery services only).', 'vikappointments');
51 break;
52
53 case 'VAP_ZIPCHECK_DISPLAY_SERVICE':
54 $result = __('Display Services', 'vikappointments');
55 break;
56
57 case 'VAP_ZIPCHECK_DISPLAY_SERVICE_DESC':
58 $result = __('Choose the first option to display all the services, otherwise choose the second one to display only the services with the <b>ZIP Restriction</b> parameter turned on.', 'vikappointments');
59 break;
60
61 case 'VAP_ZIPCHECK_DISPLAY_SERVICE_OPTION_ALL':
62 $result = __('All', 'vikappointments');
63 break;
64
65 case 'VAP_ZIPCHECK_DISPLAY_SERVICE_OPTION_RESTRICTED':
66 $result = __('Only with ZIP restriction', 'vikappointments');
67 break;
68
69 case 'VAPZIPVALID1':
70 $result = __('This service is offered in your ZIP code area!', 'vikappointments');
71 break;
72
73 case 'VAPZIPVALID0':
74 $result = __('We don\'t offer this service for the area with that ZIP Code.', 'vikappointments');
75 break;
76
77 case 'VAPFINDBUTTON':
78 $result = __('Validate ZIP', 'vikappointments');
79 break;
80
81 default:
82 // fallback to parent handler for commons
83 $result = parent::translate($string);
84 }
85
86 return $result;
87 }
88 }
89