Language editor refactoring part 3 (backend + frontend)

This commit is contained in:
Peter Papp
2021-04-01 07:50:01 +02:00
parent a8fa3694be
commit 5130082111
15 changed files with 448 additions and 903 deletions
+12
View File
@@ -526,6 +526,18 @@ function get_file_type($file_mimetype)
}
}
/**
* It map language translations as language key and language value
*
* @param $translations
* @return mixed
*/
function map_language_translations($translations)
{
return $translations->map(function ($string) {
return [$string->key => $string->value];
})->collapse();
}
/**
* Get file type from mimetype