- Timestamp:
- 06/22/07 20:54:28 (6 years ago)
- Files:
-
- doc/trunk/book/13-I18n-and-L10n.txt (modified) (1 diff)
- doc/trunk/book/17-Extending-Symfony.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doc/trunk/book/13-I18n-and-L10n.txt
r3526 r4335 169 169 170 170 // Getting a timestamp 171 $timestamp = sfI18N::getTimestampForCulture($date, $user_culture);171 $timestamp = $this->getContext()->getI18N()->getTimestampForCulture($date, $user_culture); 172 172 173 173 // 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); 175 175 176 176 Text Information in the Database doc/trunk/book/17-Extending-Symfony.txt
r4187 r4335 372 372 # automaticCleaningFactor: 0 373 373 # cacheDir: %SF_TEMPLATE_CACHE_DIR% 374 # 375 # i18n: 376 # class: sfI18N 374 377 375 378 The 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.