diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-06-09 11:42:04 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-06-09 11:42:09 +0200 |
commit | 80e49ba7b0320a5c4278c01f3d7851a9218e0919 (patch) | |
tree | 8e4c19b2ce46908b2409485a2f77f2a6c2d2fd62 /src | |
parent | 42f3bb2c6346e04d2837f980bf685f7e32a61a21 (diff) | |
download | wallabag-80e49ba7b0320a5c4278c01f3d7851a9218e0919.tar.gz wallabag-80e49ba7b0320a5c4278c01f3d7851a9218e0919.tar.zst wallabag-80e49ba7b0320a5c4278c01f3d7851a9218e0919.zip |
Convert - to _ in language
Mostly to increase language supports
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/ContentProxy.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index e4e7fb31..0c971863 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -174,6 +174,10 @@ class ContentProxy | |||
174 | */ | 174 | */ |
175 | private function validateAndSetLanguage($entry, $value) | 175 | private function validateAndSetLanguage($entry, $value) |
176 | { | 176 | { |
177 | // some lang are defined as fr-FR, es-ES. | ||
178 | // replacing - by _ might increase language support | ||
179 | $value = str_replace('-', '_', $value); | ||
180 | |||
177 | $errors = $this->validator->validate( | 181 | $errors = $this->validator->validate( |
178 | $value, | 182 | $value, |
179 | (new LocaleConstraint()) | 183 | (new LocaleConstraint()) |