Gets the value of key from a resource bundle (bundleName) based on the current Locale. When one or more parameters are specified, it formats a message through MessageFormat::format() method.
formatMessage("pnuts/lang/pnuts", "autoload.failed") ==> ResourceBundle::getBundle("pnuts/lang/pnuts", Locale::getDefault()).getObject("autoload.failed") formatMessage("pnuts/lang/pnuts", "autoload.failed", "foo.pnut") ==> MessageFormat::format( ResourceBundle::getBundle("pnuts/lang/pnuts", LC).getObject("autoload.failed"), ["foo.pnut"])
|
Gets a formatted number, currency, and percent number respectively.
imin, imax, fmin, fmax sets the number of digits for integer part or fraction part. When the value is -1 the default value is applied.
- imin
- the minimum integer digits for the NumberFormat
- imax
- the maximum integer digits for the NumberFormat
- fmin
- the minimum fraction digits for the NumberFormat
- fmax
- the maximum fraction digits for the NumberFormat
fmt1 = formatNumber(12345) fmt2 = formatCurrency(12345) fmt3 = formatPercent(0.12, 3)
Gets a formatted date, time, and both respectively.
If style is omitted "DEFAULT" is passed implicitly. style can be one of the followings (case-insensitive):
formatDate(Date(), "full") formatTime(Date(), "short") formatDateTime(Date())
|
Changes the Locale with which formatXXXX function formats objects.