All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

A-Z list with foreign characters?

atlelill 28 Nov 2013 14:09 question, complete

Hi Low, how can I get a A-Å list of letters instead of only A-Z?

I've added the html-entites to the foregin_chars.php file, changed the channel-title-field in the database to latin1_bin and the entries are sorted just fine, Æ, Ø, Å last in the list.

But exp:low_alphabet:azlist doesn't pick up the last three letters. And the listing of entries based on letter doesn't work either (domain.no/entries/æ).

I even tried to change a couple of values in pi.low_alphabet.php from "z" to "å"...

Replies

  1. Low 28 Nov 2013 14:12

    Low Alphabet currently only supports the regular old Latin alphabet. So 26 characters, A to Z. Any other alphabets aren't supported, I'm afraid...

  2. atlelill 29 Nov 2013 12:29

    Aww, come on Low! Please, how hard can it be? ;-)

    Any idea if I can hack the addon to make it work? Or another solution? We're talking about a big database of entries, so manually giving each one a category or tag is not possible...

  3. Low 29 Nov 2013 13:11

    It's trickier than you'd think! :)

    If there was a simple hack for it, I'd already have added it to LA. You could try hardcoding the custom alphabet in pi.low_alphabet.php, line #262. Right now, that says:

    $range = range('a', 'z');


    If you make that an array containing the lowercase letters, it might work. But you'd have to change all instances of strtolower and strtoupper to their multibyte counterparts: mb_strtolower / mb_strtoupper... And you might encounter other issues, too. So if you decide to tinker, it's completely up to you. Can't support that.