Commit 73a3f78
committed
feature symfony#50321 [TwigBridge] Add
This PR was merged into the 6.4 branch.
Discussion
----------
[TwigBridge] Add `AppVariable::getEnabledLocales()`
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | symfony/symfony-docs#...
This PR aims to provide a new `app.enabled_locales` getter for templates to retrieve the enabled locales configured using the `framework.enabled_locales` configuration, to make e.g. a locale switcher in the templates without to have to pass the enabled locales using e.g. a Twig global.
The docs PR will me made if the PR is accepted.
Targeting the 6.3 branch for now, will switch to 6.4 when it will be available (as feature freeze is active since late March).
Commits
-------
3e1925c [TwigBridge] Add `AppVariable::getEnabledLocales()` to retrieve the enabled localesAppVariable::getEnabledLocales() (jmsche)File tree
4 files changed
+31
-0
lines changed- src/Symfony
- Bridge/Twig
- Tests
- Bundle/TwigBundle/Resources/config
4 files changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
158 | 173 | | |
159 | 174 | | |
160 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
115 | 122 | | |
116 | 123 | | |
117 | 124 | | |
| |||
171 | 178 | | |
172 | 179 | | |
173 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
174 | 188 | | |
175 | 189 | | |
176 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
0 commit comments