diff --git a/config/routes/annotations.yaml b/config/routes/annotations.yaml index 836fcabc..bb85917e 100644 --- a/config/routes/annotations.yaml +++ b/config/routes/annotations.yaml @@ -3,3 +3,6 @@ controllers: type: annotation prefix: '{_locale}' + requirements: + # Match only locales like de_DE or de + _locale: "^[a-z]{2}(_[A-Z]{2})?$"