mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
029a8b9586
API Substitute Zend_Locale with Locale / NumberFormatter API Substitute Zend_Date with IntlDateFormatter API Added DBTIme::Nice12, FormatFromSettings API Added Short() method to DBDate / DBTime / DBDatetime API Add Date::getTimestamp() API Added setSubmittedValue api for FormField API Add second arg to base FormField::setValue() API Major refactor of i18n into component data parts API Implement Resettable interface to reset objects between tests ENHANCEMENT Changed DBField::create_field return type to `static` to support better type hinting ENHANCEMENT i18nTextCollector supports __CLASS__
67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
---
|
|
Name: basei18n
|
|
Before: '/i18n'
|
|
---
|
|
SilverStripe\i18n\Data\Sources:
|
|
module_priority:
|
|
- admin
|
|
- framework
|
|
- sapphire
|
|
---
|
|
Name: defaulti18n
|
|
---
|
|
SilverStripe\i18n\Data\Sources:
|
|
module_priority:
|
|
- other_modules
|
|
---
|
|
name: i18nMessages
|
|
---
|
|
SilverStripe\Core\Injector\Injector:
|
|
# Custom yml loader for localisation messages
|
|
SilverStripe\i18n\Messages\Reader:
|
|
class: SilverStripe\i18n\Messages\YamlReader
|
|
SilverStripe\i18n\Messages\Writer:
|
|
class: SilverStripe\i18n\Messages\YamlWriter
|
|
Symfony\Component\Translation\Loader\LoaderInterface:
|
|
class: SilverStripe\i18n\Messages\Symfony\ModuleYamlLoader
|
|
properties:
|
|
Reader: %$SilverStripe\i18n\Messages\Reader
|
|
# Ensure our cache respects ModuleYamlLoader's self-invalidation
|
|
# @see DirectoryListResource::isFresh()
|
|
# Note: This could be replaced with a more aggressive cache if necessary on a live environment
|
|
Symfony\Component\Config\ConfigCacheFactoryInterface:
|
|
class: Symfony\Component\Config\ResourceCheckerConfigCacheFactory
|
|
constructor:
|
|
0: [ %$Symfony\Component\Config\Resource\SelfCheckingResourceChecker ]
|
|
# Create default translator with standard cache path and our custom loader
|
|
Symfony\Component\Translation\TranslatorInterface:
|
|
class: Symfony\Component\Translation\Translator
|
|
constructor:
|
|
0: 'en'
|
|
1: null
|
|
2: `TEMP_FOLDER`
|
|
properties:
|
|
ConfigCacheFactory: %$Symfony\Component\Config\ConfigCacheFactoryInterface
|
|
calls:
|
|
FallbackLocales: [ setFallbackLocales, [['en']]]
|
|
Loader: [ addLoader, ['ss', %$Symfony\Component\Translation\Loader\LoaderInterface ]]
|
|
# Set this translator as our message provider for silverstripe's i18n
|
|
SilverStripe\i18n\Messages\MessageProvider:
|
|
class: SilverStripe\i18n\Messages\Symfony\SymfonyMessageProvider
|
|
properties:
|
|
Translator: %$Symfony\Component\Translation\TranslatorInterface
|
|
---
|
|
Name: textcollector
|
|
---
|
|
SilverStripe\Core\Injector\Injector:
|
|
SilverStripe\i18n\TextCollection\i18nTextCollector:
|
|
properties:
|
|
Reader: %$SilverStripe\i18n\Messages\Reader
|
|
Writer: %$SilverStripe\i18n\Messages\Writer
|
|
---
|
|
Name: i18ndata
|
|
---
|
|
SilverStripe\Core\Injector\Injector:
|
|
SilverStripe\i18n\Data\Locales:
|
|
class: SilverStripe\i18n\Data\Intl\IntlLocales
|