Open includes/search_utils.php
Find:
function convert_special($text) {
return strtr(
$text,
array(
Insert
BELOW:
//russian Windows-1251
"А" => "а",
"Б" => "б",
"В" => "в",
"Г" => "г",
"Д" => "д",
"Е" => "е",
"Ё" => "е",
"ё" => "е",
"Ж" => "ж",
"З" => "з",
"И" => "и",
"Й" => "й",
"К" => "к",
"Л" => "л",
"М" => "м",
"Н" => "н",
"О" => "о",
"П" => "п",
"Р" => "р",
"С" => "с",
"Т" => "т",
"У" => "ы",
"Ф" => "ф",
"Х" => "х",
"Ц" => "ц",
"Ч" => "ч",
"Ш" => "ш",
"Щ" => "щ",
"Ъ" => "ъ",
"Ы" => "ы",
"Ь" => "ь",
"Э" => "э",
"Ю" => "ю",
"Я" => "я",
And this: (I had to split into two parts, because this forum messes up the characters)
//russian UTF8 encoded alphabet
"А" => "а",
"Б" => "б",
"В" => "в",
"Г" => "г",
"Д" => "д",
"Е" => "е", //russ Je => e
"Ё" => "е", //russ Jo => e
"ё" => "е", //russ jo => e
"Ж" => "ж",
"З" => "з",
"И" => "и",
"Й" => "й",
"К" => "к",
"Л" => "л",
"М" => "м",
"Н" => "н",
"О" => "о",
"П" => "п",
"Р" => "р",
"С" => "с",
"Т" => "т",
"У" => "ы",
"Ф" => "ф",
"Х" => "х",
"Ц" => "ц",
"Ч" => "ч",
"Ш" => "ш",
"Щ" => "щ",
"Ъ" => "ъ",
"Ы" => "ы",
"Ь" => "ь",
"Э" => "э",
"Ю" => "ю",
"Я" => "я",
(I've attached modified search_utils.php file just in case)
This should do the trick with newly added images. For the already added images you might want run the
[Plugin] Rebuild search index.
These changes also fix problem with capital russian letters - PHP doesn't change case for russian letters unless server's locale is set to CP1251 or KOI8, so searching for "ёлка" will not find image with name "Ёлка".
@mawenzi:
in russian if a word has a letter "ё" it is grammatically correct write that word with such letter, however it is acceptable replace that letter with letter "е" without loosing the meaning.
Even though these two letters pronounce differently ("e" = "je" and "ё" = "jo"), if "e" used in such word we still pronounce it as if it was "ё" ("елка" and "ёлка" pronounce the same and have same meaning). So for search engines it is a good thing see no difference between letter "e" and "ё".
... if I enter in German language "Ara" (engl. a bird) 4images will not find "Ära" (engl. era) ...
This is correct simply because by default 4images supports deutsch:
function convert_special($text) {
return strtr(
$text,
array(
"Ä" => "AE",
"Ö" => "OE",
"Ü" => "UE",
"ä" => "ae",
"ö" => "oe",
"ü" => "ue",
"ß" => "ss"
)
);
}
in search_utils.php
P.S.
"ёлка" = "Christmas tree"