For the problem that twitter search is always searching in the default language :
In application_top you should surround the call to usu5 with an if-then :
If ($PHP_SELF != "autocomplete.php") { // added pvandebe on 19/04/2017 - to solve bug with autocomplete for twitter search
Usu_Main::i()->setVar( 'languages_id', $languages_id )
->setVar( 'request_type', $request_type )
->setVar( 'session_started', $session_started )
->setVar( 'sid', $SID )
->setVar( 'language', $language )
->setVar( 'filename', $PHP_SELF )
->initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : array(), $languages_id, $language );
}
There is still a problem when using special characters in the hreflang, that does not work at all. Allready digged into the code but I'm still not there yet. It looks like it doesn't return a UTF8 formatted string....