I'm trying to figure out how to make sure the suffix of a number does not break from the number attached. I am working on the format_size function which I called in my template.php file: caeq_format_size.
Here it goes:
function caeq_format_size($size, $langcode = NULL) {
if ($size < 1024) {
return format_plural($size, '1 byte', '@count bytes', array(), $langcode);
}
else {
$size = round($size / 1024, 2);
$suffix = t('KB', array(), $langcode);
if ($size >= 1024) {
$size = round($size / 1024, 2);
$suffix = t('MB', array(), $langcode);
}
$suffix='_'.$suffix; >>>>> This works.
$suffix='\ \;'.$suffix; >>>>> This does not work even without the escape sequence.
return t('@size@suffix', array('@size' => $size, '@suffix' => $suffix), $langcode);
}
}
I have tried the !variable format, but to no avail.
Any idea?
Comments
If you use this code;<?php
If you use this code;
and add the syle;
to your css file
___________________
It’s in the detaιls…
demonstration portfolio
Yes! Thank you very
Yes! Thank you very much!
http://www.guyverville.com
This might need a bit of testing.
As DamZ pointed out with a patch I recently submitted to core, The data still needs to go through format_plural().
Try this;
___________________
It’s in the detaιls…
demonstration portfolio