Reading_time translation not woring in 5.2.3

I created a new theme based on Casper.
Added a locales folder with me locale “sv.json” file.

The translation works for other values but reading_time won’t pick up translations.
It only shows in english.

sv.json (relevant values)

    "< 1 min read": "Mindre än 1 minuts läsning",
    "1 min read": "1 minuts läsning",
    "% min read": "% minuters läsning"

Any tips on getting it to work? Am I missing something?

Best regards,

You probably have the {{reading_time}} helper in the theme somewhere.

To make it translatable, you should change that to something like this:

{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}

Of course… thanks. :smiley:

1 Like