calibre-web icon indicating copy to clipboard operation
calibre-web copied to clipboard

feat: add handling for regional locales

Open daniel-edwards-iress opened this issue 3 months ago • 0 comments

Issue

The default is to use American-style date formats in calibre-web. I live in Australia which uses a different date format. I have added a custom translation to my local install but this causes a crash if selected when viewing books as the code attempts to locate the "en_AU" translations of the Calibre language names.

The fix

In this code change, we look for the string representation of the locale i.e. en_AU, pt_BR. If no names are returned we look at just the language portion i.e. en_AU -> en, pt_BR -> pt.

daniel-edwards-iress avatar Mar 18 '24 23:03 daniel-edwards-iress