This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Form/Extension
Fabien Potencier 2ceef595a5 feature #26825 [Form] Add choice_translation_locale option for Intl choice types (yceruto, fabpot)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Form] Add choice_translation_locale option for Intl choice types

| Q             | A
| ------------- | ---
| Branch?       | master (4.2)
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #26737
| License       | MIT
| Doc PR        | symfony/symfony-docs#...

This PR adds possibility to show the list of elements for a custom locale different to the current one and proposes also deprecate the `ChoiceLoaderInterface` implementation from all of them, moving it to a separate class.

See related issue #26737 for full description and use-case.

After:
```php
$formBuilder->add('country', CountryType::class, [
    'choice_translation_locale' => 'es',
]);
```

Alternative of https://github.com/symfony/symfony/pull/23629

TODO:

- [x] Update `UPGRADE-*.md` and `src/**/CHANGELOG.md` files.
- [x] Add some tests.

Commits
-------

9592fa64cf moved feature to 4.1
e250dfa702 Add choice_translation_locale option for Intl choice types
2018-04-22 08:19:16 +02:00
..
Core feature #26825 [Form] Add choice_translation_locale option for Intl choice types (yceruto, fabpot) 2018-04-22 08:19:16 +02:00
Csrf fixed some deprecation messages 2017-12-31 06:12:25 +01:00
DataCollector Merge branch '3.4' 2017-11-05 17:26:21 +01:00
DependencyInjection Replace more docblocks by type-hints 2017-11-07 15:45:01 +01:00
HttpFoundation Merge branch '2.7' into 2.8 2017-12-31 06:04:01 +01:00
Templating Merge branch '3.3' into 3.4 2017-11-05 17:10:10 +01:00
Validator Merge branch '3.4' into 4.0 2018-03-19 23:35:49 +01:00