problem with different languages

Come here for help or to post comments on Sphider
Post Reply
chef-olaf
Posts: 13
Joined: Wed Dec 06, 2023 7:38 am

problem with different languages

Post by chef-olaf »

Hello and good morning

I have a problem and can't find a solution
when I search under seo-search.eu in english or german for zielke I get a result
if I search for zielke under polish I get no result.
If I search with * so zielke* I also get a search result in polish

I have already compared the settings in the db settings for all languages (id in database) but I can't get any further.

HELP

greetings Olaf
User avatar
captquirk
Site Admin
Posts: 299
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: problem with different languages

Post by captquirk »

The search page customization is very nicely done!
I'm not sure what is going on with the searches...
Is there just a single database, or is there a separate database for each language? Knowing this will help me think more clearly as to what/why... :lol:
chef-olaf
Posts: 13
Joined: Wed Dec 06, 2023 7:38 am

Re: problem with different languages

Post by chef-olaf »

Hello and good morning,

I use a single database, only in the Settings table I have a separate entry for each language

see picture

greetings Olaf
settings.JPG
settings.JPG (75.01 KiB) Viewed 1627 times
User avatar
captquirk
Site Admin
Posts: 299
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: problem with different languages

Post by captquirk »

The language selected ONLY affects the text on the search page. Therefore, no matter what the search language, Sphider SHOULD return the exact same results for any search term, regardless of the search page language.

Obviously, it does not! I even confirmed that myself!

I'm not sure what the devil is going on here... Having multiple settings entries seems like a good idea (which I have never personally tried) but there must be some side effect we aren't seeing.

Sphider search does have a "secret" feature. If settings has the language set to "English", search.php presents the search page in English (well, DUH!).
BUT, if the setting language is English and you do "search.php?sl=es", guess what happens! Incidentally, when the language is changed on the fly, it stays changed until either it is changed again or the browser session is closed.

As it is, this doesn't work on your site but that is likely because of page customization. Perhaps you can play around with this on a basic search level while I try to figure out a reason why your current method isn't working (which I think it should).
chef-olaf
Posts: 13
Joined: Wed Dec 06, 2023 7:38 am

Re: problem with different languages

Post by chef-olaf »

Thanks for the answer,

I have changed the languages in the subdirectories
- https://seo-search.eu/pl/search.php -
I have made the following changes in /Settings/conf.php

$stmt = $db->prepare("SELECT * FROM ".$mysql_table_prefix. "settings WHERE id=4");

and under the respective search.php near line 108

$stem = stemInstance($stem_language);;

$sl = "pl";

maybe this information will help

greetings Olaf
User avatar
captquirk
Site Admin
Posts: 299
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: problem with different languages

Post by captquirk »

Except for "id" and "language", are all of the other settings the same? Especially "stem_language".

The minor changes you made shouldn't be causing this. However, if "stem_language" varies, that MIGHT be an issue. The settings snippet you provided does not show ALL of the settings --- understandable because there are so many columns!

I say MIGHT be an issue because if you are not using stemming in the first place, it is immaterial. If you ARE using stemming, then the "stem_language" has to be the language of the indexed site. And if you index several sites with several different languages and use the appropriate stem language for each of them. with maybe a site which was NOT stemmed... Well, that just makes my head hurt! :lol:

All things being equal, any given search SHOULD produce the exact same results REGARDLESS of the language used on the search form. This is why I am wondering if there is anything in the individual settings that upsets the equality (excepting search language).
chef-olaf
Posts: 13
Joined: Wed Dec 06, 2023 7:38 am

Re: problem with different languages

Post by chef-olaf »

Hello

Another direct hit.
You are simply brilliant.

In my stupidity I had switched off stemming for English and German, but not for the rest.

After changing the entries in settings I get the same search results for every language.

Many thanks for your endeavours to solve every problem in the best possible way.

100% competence from you

greetings Olaf
Post Reply