Development

Changeset 4335 for doc

You must first sign up to be able to contribute.

Changeset 4335 for doc

Show
Ignore:
Timestamp:
06/22/07 20:54:28 (6 years ago)
Author:
fabien
Message:

doc: updated documentation for sfI18N class

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/trunk/book/13-I18n-and-L10n.txt

    r3526 r4335  
    169169 
    170170    // Getting a timestamp 
    171     $timestamp = sfI18N::getTimestampForCulture($date, $user_culture); 
     171    $timestamp = $this->getContext()->getI18N()->getTimestampForCulture($date, $user_culture); 
    172172 
    173173    // Getting a structured date 
    174     list($d, $m, $y) = sfI18N::getDateForCulture($date, $user_culture); 
     174    list($d, $m, $y) = $this->getContext()->getI18N()->getDateForCulture($date, $user_culture); 
    175175 
    176176Text Information in the Database 
  • doc/trunk/book/17-Extending-Symfony.txt

    r4187 r4335  
    372372    #      automaticCleaningFactor: 0 
    373373    #      cacheDir:                %SF_TEMPLATE_CACHE_DIR% 
     374    # 
     375    #  i18n: 
     376    #    class: sfI18N 
    374377 
    375378The best way to change a factory is to create a new class inheriting from the default factory and to add new methods to it. For instance, the user session factory is set to the `myUser` class (located in `myapp/lib/`) and inherits from `sfUser`. Use the same mechanism to take advantage of the existing factories. Listing 17-14 shows an example of a new factory for the request object.