Convert transformation descriptions to gettext.
[phpmyadmin/blinky.git] / libraries / transformations / application_octetstream__hex.inc.php
blob712235498469622160580a254fb704b3c97c98e7
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * @package phpMyAdmin-Transformation
5 * @version $Id$
6 */
8 function PMA_transformation_application_octetstream__hex_info() {
9 return array(
10 'info' => __('Displays hexadecimal representation of data. Optional first parameter specifies how often space will be added (defaults to 2 nibbles).'),
14 /**
17 function PMA_transformation_application_octetstream__hex($buffer, $options = array(), $meta = '') {
18 // possibly use a global transform and feed it with special options:
19 // include './libraries/transformations/global.inc.php';
20 if (!isset($options[0])) {
21 $options[0] = 2;
22 } else {
23 $options[0] = (int)$options[0];
26 if ($options[0] < 1) {
27 return bin2hex($buffer);
28 } else {
29 return chunk_split(bin2hex($buffer), $options[0], ' ');