Convert - to _ in language

Mostly to increase language supports
This commit is contained in:
Jeremy Benoist
2017-06-09 11:42:04 +02:00
parent 42f3bb2c63
commit 80e49ba7b0
3 changed files with 13 additions and 5 deletions

View File

@ -174,6 +174,10 @@ class ContentProxy
*/
private function validateAndSetLanguage($entry, $value)
{
// some lang are defined as fr-FR, es-ES.
// replacing - by _ might increase language support
$value = str_replace('-', '_', $value);
$errors = $this->validator->validate(
$value,
(new LocaleConstraint())