Codeigniter Multilanguage MY_Language.php adding two language abbreviations in url like site.com/en/en/ - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Codeigniter Multilanguage MY_Language.php adding two language abbreviations in url like site.com/en/en/ (/showthread.php?tid=30585) |
Codeigniter Multilanguage MY_Language.php adding two language abbreviations in url like site.com/en/en/ - El Forum - 05-19-2010 [eluser]jayapalchandran[/eluser] Hi, I am following this option for adding languages in my site. http://codeigniter.com/wiki/URI_Language_Identifier/ I want my url like site.com/en/something/ I followed the instructions and autoloaded MY_Language.php what is happening is i get something like this sitename.com/en/en/something/ and which says 404 error. What i found in MY_Language.php is the page is redirecting twice one time with on en and the next time with two en/en which gives an error... i tested this by echoing the path at line no... Code: header('Location: '.$RTR->config->item('base_url').$index_page.$RTR->uri->uri_string); i tested like this... Code: /* redirect after inserting language id */ and i am not much into redirections, regex and routing... and then tried this.... http://maestric.com/doc/php/codeigniter_i18n and the result is another story which i will start discussing if the above is not going to get solved. and I WONDER WHY THERE WAS NOT A CLEAR TUTORIAL OR A LIST OF STEPS TO USE LANGUAGES IN CODEIGNITER ESPECIALLY WITH THE LANGUAGE ABBREVIATIONS IN THE URL LIKE SITENAME.COM/EN/ anyway let me hope to get a solutions... the reason why i am here is i dont want use my own thought to correct it because sometimes later that would cause some problems... so that is the reason i am here... meanwhile i am trying to do gimmicks to get what i want... let us c. Codeigniter Multilanguage MY_Language.php adding two language abbreviations in url like site.com/en/en/ - El Forum - 05-20-2010 [eluser]jayapalchandran[/eluser] http://codeigniter.com/wiki/URI_Language_Identifier/ This is working for me. The mistake i did was auto loading my_language.php in both i18n and in this. So i got the language abbr two times in the url. anyway… yet to go a long distance… |