1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-17 17:08:37 +00:00

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
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
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())