Formats data according to local conventions. This is an easier-to-use helper version of the LocaleInfo set of classes. To set the locale, set the config param: sprout.locale The default is AUS - Australia
This is the code documentation for the SproutCMS project
Search documentation |
class I18nFormats data according to local conventions. This is an easier-to-use helper version of the LocaleInfo set of classes. To set the locale, set the config param: sprout.locale The default is AUS - Australia
Extending this class<?php /** * New class description goes here * * @author Your Name, 2024-11-25 **/ class NewClassName extends I18n { /** * Return a formatted number **/ public function number (float $number, int $precision) { // Method code goes here } /** * Return a formatted currency value **/ public function money (float $number, $precision) { // Method code goes here } /** * Return a formatted date in a short format (e.g. 3/1/2003) **/ public function shortdate (int $timestamp) { // Method code goes here } /** * Return a formatted date in a short format (e.g. Mon 3rd Jan 2003) **/ public function longdate (int $timestamp) { // Method code goes here } /** * Return a formatted dtime (e.g. 5:30pm) **/ public function time (int $timestamp) { // Method code goes here } /** * Returns HTML for address fields **/ public function addressFields (bool $required) { // Method code goes here } /** * Set the locale to the default as per the configuration **/ public function init () { // Method code goes here } /** * Set the locale to something other than the default * Useful for multi-currency shopping carts, for example. **/ public function setLocale (string $country) { // Method code goes here } /** * Return JavaScript code which initialises the I18n javascript library with the locale parameters **/ public function initJavaScript () { // Method code goes here } } ?> |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |