well....I now understand why there are language tabs when posting ad and why it only searches based on locale code that is "set" by selecting the language from the dropdown selector. For those few who are trying to run a dual language site and as confused as I was about how it works...
1. For each language installed, a new tab for that language appears above the title and description input fields when posting an ad. The tab allows the poster to choose a particular language. I believe this is so that the user can post an ad in multiple languages. And depending on which tab the poster chooses, the title and description is "tied" to that language locale code. If a poster enters title and description for each tab (i.e. language), then that ad would have title and description for each language each marked with its respective locale code in the db. (Note: mysql settings allowing, the poster can post the same ad in same language for all language choices...i think db has to be set to utf-8? I'm a complete novice so whatever Im posting here are just my guesses based on what I was able to figure out)
Looking at the db, each ad post generates one "row" of data for each language. They all have the same fk_i_item_id, then each with its own fk_c_locale_code, and s_title and s_description with whatever the poster filled in in that particular language tab input field.
So if a user only entered title and description under the english tab when posting the ad, all the other language title and description cells will be empty. Or if they only entered title and descrip in one of the other available languages, the the other language cells will be empty, etc.
2. The above seems to work fine and gives the user another choice in how they present the ad (i.e multiple languages).
The problem seems to come in when doing a search based on title and description. Currently when a visitor does a search from the main search box, it will SHOW only those matching ads IF it has title and description "tagged" with the language/locale code that matches the language code of the language currently in use by the visitor. The search seems to return the ad because if I switch languages on the results page, the ad shows up. In showing the ad, it seems like the ad is treated as individual ads for each language. So I believe the logic is that if there wasn't this filter, the same ad could show up multiple times in search if the poster posted a title and description in multiple languages or in the same language multiple times under each language tab.
I believe the way it works right now needs an additional step for sites running multiple languages.
1. Is there a way to have it so that
search shows all the results as long as it has a unique fk_i_item_id
if there are multiple instances of title and description for one item id, show the one that matches the fk_c_locale_code of the user (I believe it's already doing this by default if I'm not mistaken).
So by showing all the ads that have unique item id, it would return ads regardless of language chosen by the visitor.
OR
2. If 1 isn't possible, is there a way to check during ad posting and populating the title and description cells of the other languages if they are left empty by the poster?
If you've read all this, I thank you! If you can point me in the right direction, I love you!
will only search title and description cells of a single language/locale code (which is set when the user selects the language from the dropdown selector or by default based on default language). If those cells are empty for that language/locale code, then the search results doesn't SHOW that ad.
Since there are in effect mutliple instances of the ad in the db based on language/locale code,