https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36947 --- Comment #62 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 183552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183552&action=edit Bug 36947: Add system preference for configurable locale-based facet sorting This follow-up adds two major enhancements to the locale-based facet sorting implementation: 1. **System Preference Integration** - Adds FacetSortingLocale system preference for configurable locale selection - Dynamically detects available system locales using Koha::I18N - Provides user-friendly dropdown with locale descriptions - Supports both Elasticsearch and Zebra search engines 2. **Zebra Search Engine Support** - Extends locale-based sorting to Zebra (in addition to existing Elasticsearch) - Implements _sort_facets_zebra() function in C4::Search - Maintains consistent Unicode-aware sorting behavior across search engines Key Features: - Dynamic locale detection via Koha::I18N::available_locales() - Proper module architecture with comprehensive unit tests - Clean fallback chain: preference → system LC_COLLATE → default - Admin UI integration in System Preferences → I18N/L10N - Universal facet sorting for international library systems Test plan: 1. Apply patch and restart services 2. Install/run database update 3. Navigate to Administration → System Preferences → I18N/L10N 4. Verify "Sort facet names using" dropdown shows available system locales 5. Test facet sorting with different locales and both search engines 6. Run: prove t/Koha/I18N.t t/Koha/SearchEngine/Elasticsearch/Search.t t/db_dependent/Search_FacetSorting.t -- You are receiving this mail because: You are watching all bug changes.