Multilingual i18n enviroment for CodeIgniter |
[eluser]brizoo[/eluser]
Hi, Thank you very much for this i18n library, this is the only easy one I've found. I'm still stuck with a little problem, how do you do to remove the index.php part of the URL ? I have Code: $config['index_page'] = ''; my routes are these : Code: $route['default_controller'] = "example"; and my .htaccess file is like this : Code: RewriteEngine on Thanks
[eluser]keevitaja[/eluser]
http://ellislab.com/codeigniter/user-gui.../urls.html read the part which begins with the "Removing the index.php file"
[eluser]brizoo[/eluser]
[quote author="keevitaja" date="1355835511"]http://ellislab.com/codeigniter/user-guide/general/urls.html read the part which begins with the "Removing the index.php file"[/quote] This is exactly what I've followed but this is still not working for me
[eluser]brizoo[/eluser]
Ok, I got it ! I had to do this for the .htaccess file : [Code] RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] <Files "index.php"> AcceptPathInfo On </Files> [\Code]
[eluser]darksoulsong[/eluser]
I'm using this library and everything is doing just fine. But I'm trying to make CI redirect to the main lang when an unsupported lang is supplied. I tried to debug it on the MY_Lang file, but it seems that the language request is handled somewhere else before reaching this location, giving me a 404 page. Any ideas about how to acomplish that? TYVM.
[eluser]keevitaja[/eluser]
try config/routes.php but what does a unsupported lang stand for? when you have french and english with en and fr then xx would be unsupported? i that case you have to redirect all first uri segments with length of 2. not wise
[eluser]darksoulsong[/eluser]
Well, the idea is to handle the following situation: My site has 2 supported languages: "pt-br" and "en". The first one was set as the main site language. Let's say a user commits a typo and writes "pt" instead of "pt-br". In that case, the system redirects him to the default language that was set previously (pt-br, in my situation). My goal is to redirect the user to "pt-br" if an unsupported lang is supplied, like "chinese", for example. That would be much more friendly than just give him a 404 page.
[eluser]ranggadablues[/eluser]
Hi there, I like your multi language helper. But every time I go to another menu it's always back to default language, so I have to change the other language again. For the example the default language is English, and from about page I change to Dutch language then I go to news page it's back to default language. How that every time I go to another page without changing the language? thank you
[eluser]keevitaja[/eluser]
you must use helper lanchor() instead of anchor() in view files.
[eluser]ranggadablues[/eluser]
[quote author="keevitaja" date="1360230162"]you must use helper lanchor() instead of anchor() in view files.[/quote] thanks, I will try.. |
Welcome Guest, Not a member yet? Register Sign In |