1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Fix epub language

Ensure language has `_` instead of `-`
And update wallabag/phpepub
This commit is contained in:
Jeremy Benoist 2022-03-02 20:36:02 +01:00
parent 5e377b8925
commit 2c870423c4
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
3 changed files with 10 additions and 10 deletions

View file

@ -161,8 +161,8 @@ class EntriesExport
*/
$book->setTitle($this->title);
// Not needed, but included for the example, Language is mandatory, but EPub defaults to "en". Use RFC3066 Language codes, such as "en", "da", "fr" etc.
$book->setLanguage($this->language);
// EPub specification requires BCP47-compliant languages, thus we replace _ with -
$book->setLanguage(str_replace('_', '-', $this->language));
$book->setDescription('Some articles saved on my wallabag');
$book->setAuthor($this->author, $this->author);