Skip to content

FrameworkBundle - Fallback locale #13373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
trsteel88 opened this issue Jan 12, 2015 · 1 comment
Closed

FrameworkBundle - Fallback locale #13373

trsteel88 opened this issue Jan 12, 2015 · 1 comment

Comments

@trsteel88
Copy link
Contributor

Ok, so within the translator documentation (http://symfony.com/doc/current/components/translation/introduction.html#fallback-locales) you can set multiple fallback locales. However, in the framework bundle, the fallback config option is a "scalarNode" and doesn't allow you to set an array (https://github.com/symfony/FrameworkBundle/blob/master/DependencyInjection/Configuration.php#L463)

Within the extension, it is checking if the value is an array (https://github.com/symfony/FrameworkBundle/blob/master/DependencyInjection/FrameworkExtension.php#L645). However, you can't actually set an array or you get the error:

InvalidTypeException in ScalarNode.php line 36:
Invalid type for path "framework.translator.fallback". Expected scalar, but got array.

Rather than using scalarNode, should this be changed to arrayNode?

@ad3n
Copy link

ad3n commented Jan 12, 2015

+1

fabpot added a commit that referenced this issue Jan 25, 2015
… (aitboudad)

This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle][config] allow multiple fallback locales.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets  | #13373
| Doc PR        | symfony/symfony-docs#4834
| Tests pass?   | yes
| License       | MIT

Commits
-------

1251f0e [FrameworkBundle][config] allow multiple fallback locales.
@fabpot fabpot closed this as completed Jan 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants