-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathshowAllMultilangFields.php
45 lines (28 loc) · 1.02 KB
/
showAllMultilangFields.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
// debug / info script:
// show all template field names and labels (for each language)
// proved to be essential to avoid chaos with almost 100 template fields in a product template
$template = $templates->get('product');
echo "<table border=1 cellpadding=3 cellspacing=0>";
echo "<tr>";
echo "<th>Field Name</th>";
echo "<th>Field Label DE</th>";
echo "<th>Field Label EN</th>";
echo "<th>Field Label US</th>";
echo "<th>Field Label FR</th>";
echo "</tr>";
foreach($template->fields as $field) {
echo "<tr>";
echo "<td>" . $field->name . "</td>";
$user->language = $languages->get("default");
echo "<td>" . $fields->getLabel($field->name) . "</td>";
$user->language = $languages->get("en");
echo "<td>" . $fields->getLabel($field->name) . "</td>";
$user->language = $languages->get("us");
echo "<td>" . $fields->getLabel($field->name) . "</td>";
$user->language = $languages->get("fr");
echo "<td>" . $fields->getLabel($field->name) . "</td>";
echo "</tr>";
}
echo "</table>";
?>