[ PHPXref.com ] [ Generated: Sun Jul 20 16:35:25 2008 ] [ bBlog 0.7.6 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/bblog/bBlog_plugins/ -> modifier.locale.php (source)

   1  <?php
   2  // modifier.locale.php - smarty modifier to set locale
   3  function smarty_modifier_locale($stream, $locale) {
   4    setlocale("LC_ALL", $locale);
   5    setlocale("LC_TIME", $locale);
   6    setlocale("LC_LANG", $locale);
   7  
   8    return $stream;
   9  }
  10  
  11  function identify_modifier_locale () {
  12    return array (
  13      'name'           =>'locale',
  14      'type'           =>'smarty_modifier',
  15      'nicename'       =>'Set Locale',
  16      'description'    =>'Set locale and return unmodified input data',
  17      'authors'         =>'Sebastian Werner',
  18      'licence'         =>'GPL'
  19    );
  20  }
  21  
  22  function bblog_modifier_locale_help () {
  23  ?>
  24  <p>Set Locale</p>
  25  <pre>
  26  {$post.posttime|locale:"de_DE"|data_format:"date"}
  27  </pre>
  28  <?php
  29  }
  30  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]