Translated using Weblate (French)
[phpmyadmin.git] / server_collations.php
blob2af16473d8c7e5280ba55a1c3911c8e0b7006535
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
9 * requirements
11 require_once 'libraries/common.inc.php';
13 /**
14 * Does the common work
16 require 'libraries/server_common.inc.php';
19 /**
20 * Displays the sub-page heading
22 echo '<h2>' . "\n"
23 . ' ' . PMA_Util::getImage('s_asci.png')
24 . '' . __('Character Sets and Collations') . "\n"
25 . '</h2>' . "\n";
27 /**
28 * Includes the required charset library
30 require_once 'libraries/mysql_charsets.lib.php';
33 /**
34 * Outputs the result
36 echo '<div id="div_mysql_charset_collations">' . "\n"
37 . '<table class="data noclick">' . "\n"
38 . '<tr><th>' . __('Collation') . '</th>' . "\n"
39 . ' <th>' . __('Description') . '</th>' . "\n"
40 . '</tr>' . "\n";
42 $i = 0;
43 $table_row_count = count($mysql_charsets) + count($mysql_collations);
45 foreach ($mysql_charsets as $current_charset) {
46 if ($i >= $table_row_count / 2) {
47 $i = 0;
48 echo '</table>' . "\n"
49 . '<table class="data noclick">' . "\n"
50 . '<tr><th>' . __('Collation') . '</th>' . "\n"
51 . ' <th>' . __('Description') . '</th>' . "\n"
52 . '</tr>' . "\n";
54 $i++;
55 echo '<tr><th colspan="2" class="right">' . "\n"
56 . ' ' . htmlspecialchars($current_charset) . "\n"
57 . (empty($mysql_charsets_descriptions[$current_charset])
58 ? ''
59 : ' (<i>' . htmlspecialchars(
60 $mysql_charsets_descriptions[$current_charset]
61 ) . '</i>)' . "\n")
62 . ' </th>' . "\n"
63 . '</tr>' . "\n";
64 $odd_row = true;
65 foreach ($mysql_collations[$current_charset] as $current_collation) {
66 $i++;
67 echo '<tr class="'
68 . ($odd_row ? 'odd' : 'even')
69 . ($mysql_default_collations[$current_charset] == $current_collation
70 ? ' marked'
71 : '')
72 . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
73 . '">' . "\n"
74 . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
75 . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
76 . '</tr>' . "\n";
77 $odd_row = !$odd_row;
80 unset($table_row_count);
81 echo '</table>' . "\n"
82 . '</div>' . "\n";