sorry for late reply, I solved my case.
I do not know if this is interesting for someone else, but to explain it:
1. The client wants that the site is opened in the default language (In my case Bulgarian) independent on the browser settings.
Very often here the operating system and the browsers are configured for default English, so I cannot use "current else browser".
With such a configuration in 60-70% of the initial visits the site would open in English, which is not the behavior wanted by the client.
2. I want the search to work in Ajax mode. The only way I managed to achieve this to work properly is with setting the YAMS mode to "current".
Actually what happens is, that the search results are OK, but the links are not good for YAMS
and independent where the result is found (in English or Bulgarian part of the page) the link is the same.
With mode set to "current" the result is correct in 99% of the cases, because normal user behavior is to search in the language he sees currently.
These 2 requirements are partially contradicting
- initial open in the default language independent on the browser setting and needed "current" mode of YAMS to have proper search behavior
How I solved this:
- Generally speaking with quite dirty redirect
-- created start page with monolingual template
-- in this page simple snippet is called, which redirects to the real start page with proper root setting.
The snippet looks like this:
<?php
header('Content-language: bg');
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.bbr.bg/bg/bulgarian-development-bank.html');
?>
As you can see this is quite dirty, but it solves the problem I have.
I don’t know if this problem is not too specific,
but clean and elegant solution would be if YAMS has mode, which is "current else default"
I would expect such configuration is needed in countries where it is normal to use the OS (and browsers configuration) in English,
But to expect the sites to open in different language
Regards,