Canonicalize content language

For example, ensure that pt_br or pt-br are all converted to pt_BR
before being stored.

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2025-03-02 19:34:52 +01:00
parent 063bed0010
commit c2d2be6f52

View file

@ -102,7 +102,7 @@ class ContentProxy
);
if (0 === \count($errors)) {
$entry->setLanguage($value);
$entry->setLanguage(\Locale::canonicalize($value));
return;
}