PluginProbe ʕ •ᴥ•ʔ
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More / 2.6.7
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More v2.6.7
2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.7 2.6.8 2.6.5 2.6.4 2.6.3 2.6.2 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1 1.1.1 1.1.2 1.2.0 2.0 2.1.0 2.1.1 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1
reviews-feed / class / Common / Settings / Tabs / SBR_Translation_Tab.php
reviews-feed / class / Common / Settings / Tabs Last commit date
SBR_Advanced_Tab.php 2 months ago SBR_Feeds_Tab.php 2 months ago SBR_General_Tab.php 2 months ago SBR_Translation_Tab.php 2 months ago
SBR_Translation_Tab.php
163 lines
1 <?php
2
3 /**
4 * Class Feeds Settings Tab
5 *
6 * @since 1.0
7 */
8
9 namespace SmashBalloon\Reviews\Common\Settings\Tabs;
10
11 use SmashBalloon\Reviews\Common\Util;
12 use Smashballoon\Customizer\V2\SB_SettingsPage_Tab;
13
14 if (!defined('ABSPATH')) {
15 exit; // Exit if accessed directly
16 }
17
18 class SBR_Translation_Tab extends SB_SettingsPage_Tab {
19 /**
20 * Get the Settings Tab info
21 *
22 * @since 1.0
23 *
24 * @return array
25 */
26 protected function tab_info()
27 {
28 return [
29 'id' => 'sb-translation-tab',
30 'name' => __('Language & Translation', 'reviews-feed')
31 ];
32 }
33
34 /**
35 * Get the Settings Tab Section
36 *
37 * @since 1.0
38 *
39 * @return array
40 */
41 protected function tab_sections()
42 {
43 return [
44 'localization_section' => [
45 'id' => 'localization',
46 'type' => 'select',
47 'heading' => __('Language', 'reviews-feed'),
48 'info' => sprintf(
49 __('Change the displayed language for all feeds and its displayed reviews. You can override this for each feed from the individual feed settings.%sLearn more%s <br/>
50 %sNote: Currently only Google support translated reviews.%s', 'reviews-feed'),
51 '<a href="https://smashballoon.com/doc/language-reviews-feed/?utm_campaign=reviews-free&utm_source=settings&utm_medium=docs" target="_blank" rel="noreferrer" >',
52 '</a>',
53 '<span class="sb-notice sb-notice-control sb-notice-default sb-text-tiny" style="padding: 0 12px; margin-top: 7px; width: auto;">',
54 '</span>'
55 ),
56 'options' => Util::get_translation_languages(),
57 'inputLeadingIcon' => 'translate',
58 'separator' => true
59 ],
60 'translation_section' => [
61 'type' => 'translation',
62 'id' => 'translations',
63 'layout' => 'full',
64 'heading' => __('Custom Text/Translate', 'reviews-feed'),
65 'description' => __('Enter custom text for the words below, or translate it into the language you would like to use.', 'reviews-feed'),
66 'sections' => [
67 [
68 'heading' => __('Dates', 'reviews-feed'),
69 'elements' => [
70 [
71 'id' => 'writeReview',
72 'text' => __('Write a Review', 'reviews-feed'),
73 'description' => __('Used for header “Write a Review” button', 'reviews-feed'),
74 ],
75 [
76 'id' => 'second',
77 'text' => __('second', 'reviews-feed'),
78 'description' => __('Used for “Posted a second ago”', 'reviews-feed'),
79 ],
80 [
81 'id' => 'seconds',
82 'text' => __('seconds', 'reviews-feed'),
83 'description' => __('Used for “Posted a seconds ago”', 'reviews-feed'),
84 ],
85 [
86 'id' => 'minute',
87 'text' => __('minute', 'reviews-feed'),
88 'description' => __('Used for “Posted a minute ago”', 'reviews-feed'),
89 ],
90 [
91 'id' => 'minutes',
92 'text' => __('minutes', 'reviews-feed'),
93 'description' => __('Used for “Posted a minutes ago”', 'reviews-feed'),
94 ],
95 [
96 'id' => 'hour',
97 'text' => __('hour', 'reviews-feed'),
98 'description' => __('Used for “Posted a hour ago”', 'reviews-feed'),
99 ],
100 [
101 'id' => 'hours',
102 'text' => __('hours', 'reviews-feed'),
103 'description' => __('Used for “Posted a hours ago”', 'reviews-feed'),
104 ],
105 [
106 'id' => 'day',
107 'text' => __('day', 'reviews-feed'),
108 'description' => __('Used for “Posted a day ago”', 'reviews-feed'),
109 ],
110 [
111 'id' => 'days',
112 'text' => __('days', 'reviews-feed'),
113 'description' => __('Used for “Posted a days ago”', 'reviews-feed'),
114 ],
115 [
116 'id' => 'week',
117 'text' => __('week', 'reviews-feed'),
118 'description' => __('Used for “Posted a week ago”', 'reviews-feed'),
119 ],
120 [
121 'id' => 'weeks',
122 'text' => __('weeks', 'reviews-feed'),
123 'description' => __('Used for “Posted a weeks ago”', 'reviews-feed'),
124 ],
125 [
126 'id' => 'month',
127 'text' => __('month', 'reviews-feed'),
128 'description' => __('Used for “Posted a month ago”', 'reviews-feed'),
129 ],
130 [
131 'id' => 'months',
132 'text' => __('months', 'reviews-feed'),
133 'description' => __('Used for “Posted a months ago”', 'reviews-feed'),
134 ],
135 [
136 'id' => 'year',
137 'text' => __('year', 'reviews-feed'),
138 'description' => __('Used for “Posted a year ago”', 'reviews-feed'),
139 ],
140 [
141 'id' => 'years',
142 'text' => __('years', 'reviews-feed'),
143 'description' => __('Used for “Posted a years ago”', 'reviews-feed'),
144 ],
145 [
146 'id' => 'ago',
147 'text' => __('ago', 'reviews-feed'),
148 'description' => __('Used for “Posted a XXX ago”', 'reviews-feed'),
149 ],
150 [
151 'id' => 'reviewsHeader',
152 'text' => __('Over %s Reviews', 'reviews-feed'),
153 'description' => __('Used for header Reviews number “Over XXX Reviews”, make sure to add %s to be replaced with reviews number.', 'reviews-feed'),
154 ]
155 ]
156 ]
157 ]
158 ]
159 ];
160 }
161
162 }
163