Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
3 lars 1
<?php
2
    /*
3
    * Smarty plugin
4
    *
5
    -------------------------------------------------------------
6
    * File:     modifier.money_format.php
7
    * Type:     modifier
8
    * Name:     money_format
9
    * Version:  1.0
10
    * Date:     Feb 8th, 2003
11
    * Purpose:  pass value to PHP money_format() and return result
12
    * Install:  Drop into the plugin directory.
13
    * Author:   Michael L. Fladischer <mfladischer@abis.co.at>
14
    *
15
    -------------------------------------------------------------
16
    */
17
    function smarty_modifier_money_format_red( $string, $places = 2, $locale =
18
        "de_DE" )
19
    {
20
        if ( !$locale )
21
        {
22
            $locale = "de_DE";
23
        }
24
        setlocale( LC_MONETARY, $locale );
25
        return money_format( "%.{$places}i", $string );
26
    }
27
 
28
    /* vim: set expandtab: */
29
?>