Closed (fixed)
Project:
Glossary
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Dec 2006 at 20:01 UTC
Updated:
29 Nov 2007 at 02:11 UTC
I am using the Glossary module with Drupal 5. It seems to be working (applied the patch), but since our site is in cyrillic, the alphabet bar shows question marks. I found the following bit of code in the module file, which seems to be generating it, but I do not know what to substitute in the array directive (I need the Cyrillic alphabet there):
function _glossary_alphabar($vid, &$tree) {
$blocks = array(range('0', '9'), range('a', 'z'));
$vids = _glossary_get_filter_vids();
$found_letters = array();
foreach ($tree as $key=>$term) {
if ($term->depth == 0) {
$firstletter = strtolower($term->name[0]);
if (! array_key_exists($firstletter, $found_letters)) {
$found_letters[$firstletter] = 1;
$tree[$key]->firstletter = $firstletter;
}
}
}
I hope it is simple, but I am not into coding.
Comments
Comment #1
Deyan commentedI've figured it out :)
Comment #2
(not verified) commentedComment #3
andrés chandía commentedCan you explain how it is solved, i figure out this should work for latin alphabet also, i've checked the code and i have the same but i can not display "ñ" for instace, instead appears a "?" symbol, some advice to fix this?
Thanks in advance
Comment #4
nancydruduplicate of http://drupal.org/node/48966