I've been trying to figure out how to modify glossary.module so that the alphabet that appears at the top of glossary would support non-English letters. Latvian alphabet has the same letters as English plus additional letters like ā (a with a line over it), š (s with a mark over it), etc.

I have been searching the forums but have not found a solution yet.

I thought maybe the newest glossary version 4.7 would address this issue but it doesn't appear to.

1. Why doesn't glossary 4.7 include po files as earlier versions did?

2. Is there a way to make glossary work with other alphabets? Looking through glossary.module I found the following:

function _glossary_alphabar($vid, &$tree) {
  $blocks = array(range('0', '9'), range('a', 'z'));

I have limited coding experience. Can the range be modified to work with non-English alphabets. If so, how?

Thanks!

Comments

Freso’s picture

Note: I have no experience with Glossary in any way (yet). Please keep this in mind as you read on. :)

I think that either the list of characters shown should be available as a t() string, or configurable from the admin pages. I'm not sure which would be the better solution of the two, but hardcoding it to 0-9a-z isn't great. (What about CJK sites, for example?)

Another way could be to only list those characters that are actually in use - ie. a site with USA, EU, ÅB would have "E U Å" - it should probably use some algorithm do put capitalised and non-capitalised versions of the same letter/character in the same 'group'.

nancydru’s picture

Status: Active » Closed (duplicate)