Is there any API function to get the active/selected language in Drupal 6? There are different ways to negotiate the language in D6 (e.g. url prefix, $user->language, fallback language, ...), but how can I get the active language in a module? Checking $user->language is apparently not sufficient because one can override this with a url prefix (e.g. language switcher block). I couldnt find an API call like i18n_get_lang() (from i18n module) in Drupal 6.
Say for instance that I want to search for users who are interested in golf. If I type "golf" and ask to search inside "Users", it returns no results, even though I know that there are a few dummy users (for instance Kevin) that I created, who have "golf" listed among their interests on their profile pages. If I'm not mistaken, that's because it searches for User-names and not for profile fields.
Now, what would be the best way to make this work???
I know that there are potentially easy solutions to this problem. And I wanted to see what solutions you will recommend.