we may not blindly depend on a parameter from core that might not be set

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

For the situation where no locales are configured, the current code gives an error about an undefined parameter.