l10n

Summary

Formats time, shorttime, date, shortdate, currency, number, etc.

Usage

$input_number|l10n( type )

Parameters

NameTypeDescriptionRequired
type string Number formating type. yes

Returns

input_number formatted to locale specification.

Description

Localizes values to current locale. The allowed types are

  • time
  • shorttime
  • date
  • shortdate
  • datetime
  • shortdatetime
  • currency
  • clean_currency
  • number

Examples

Locale set to eng-GB.

{let number=1234.567

    timestamp=currentdate()}

 

time          - {$timestamp|l10n( 'time' )}

shorttime     - {$timestamp|l10n( 'shorttime' )}

date          - {$timestamp|l10n( 'date' )}

shortdate     - {$timestamp|l10n( 'shortdate' )}

datetime      - {$timestamp|l10n( 'datetime' )}

shortdatetime - {$timestamp|l10n( 'shortdatetime' )}

currency      - {$number|l10n( 'currency' )}

clean_currency - {$number|l10n( 'clean_currency' )}

number        - {$number|l10n( 'number' )}

 

{/let}

returns

time          - 1:46:05 pm

shorttime     - 1:46 pm

date          - Friday 06 February 2004

shortdate     - 06/02/2004

datetime      - Friday 06 February 2004 1:46:05 pm

shortdatetime - 06/02/2004 1:46 pm

currency      - £ 1,234.57

clean_currency - 1,234.57

number        - 1,234.57

Comments

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
       datetime
       i18n
       l10n
       si
       x18n
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
11:36:19 am
by Balazs Halasy

Last updated

11/05/2004
4:47:21 pm
by Derick Rethans

Authors

Balazs Halasy
Kåre Køhler Høvik
Gunnstein Lye
Derick Rethans



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.