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:
parent
42f3bb2c63
commit
80e49ba7b0
3 changed files with 13 additions and 5 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue