46 $coreTranslator = new \Erebot\Intl(
'Erebot\\Styling');
47 $coreTranslator->setLocale(\
Erebot\IntlInterface::LC_MESSAGES, $locale);
54 $rule = $coreTranslator->_(
62 " 2: =#0= seconds;\n".
64 " 61/60: <%%min<, >%with-words>;\n".
65 " 3600/60: <%%hr<;\n".
66 " 3601/60: <%%hr<, >%with-words>;\n".
67 " 86400/86400: <%%day<;\n".
68 " 86401/86400: <%%day<, >%with-words>;\n".
69 " 604800/604800: <%%week<;\n".
70 " 604801/604800: <%%week<, >%with-words>;\n".
73 " 2: =#0= minutes;\n".
85 $formatter = new \NumberFormatter(
87 \NumberFormatter::PATTERN_RULEBASED,
90 return (
string) $formatter->format($this->value);
Interface to provide internationalization.
$value
The duration to format (in seconds).
A class used to format durations.
render(\Erebot\IntlInterface $translator)
$translator
Translator to use to improve rendering.