Bilingual SEO URLs can be done via .htaccess if multi language variable is on in php.ini file.
Otherwise code will not work.