services:
    notimeo.locale.form.type.locale_lang:
        class: Notimeo\LocaleBundle\Form\Type\LocaleLangType
        arguments:
            - "%locales%"
        tags:
            - { name: form.type, alias: 'notimeo_locale_lang_type'}
    validator.notimeo.contains_main_locale:
        class: Notimeo\LocaleBundle\Validator\Constraints\ContainsMainLocaleValidator
        arguments: ["%locale%", "@translator"]
        tags:
            - { name: validator.constraint_validator, alias: contains_main_locale }
    validator.notimeo.one_per_lang:
        class: Notimeo\LocaleBundle\Validator\Constraints\OneLocalePerLangValidator
        tags:
            - { name: validator.constraint_validator, alias: one_locale_per_lang }
    notimeo.locale:
        class: Notimeo\LocaleBundle\Services\LocaleService
        arguments:
            - "@request_stack"
            - "%locale%"
            - "%locales%"
    notimeo.locale.listener:
        class: Notimeo\LocaleBundle\EventListener\LocaleListener
        arguments:
            - '%locale%'
        tags:
            - { name: kernel.event_listener, event: kernel.controller }