Internationalization Views i18n -> problem |
[eluser]polyvoid[/eluser]
I tried this (wiki: Internationalization Views i18n link=http://codeigniter.com/wiki/Category:Internationalization::Internationalization_Views_i18n/) today, and I can't get it to work... It displays the contents of the "url_i18n_helper.php"-file instead of the correct url. I think I did everything correct? - config.php: added: $config['lang_code'] = "nl"; - routes.php: changed: $route['default_controller'] = "test"; added: $route['fr'] = "test"; $route['^fr/(.+)$'] = "$1"; What did I create: i18n.php (location: /system/application/controllers/) url_i18n_helper.php (location: /system/application/helpers/) test.php (location: /system/application/controllers/) with this content: Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); test_fr.php (location: /system/application/views/) test_nl.php (location: /system/application/views/) All 3 above views have static content. Can someone help me out here please? thanks!!
[eluser]TheFuzzy0ne[/eluser]
If you can see the contents of a file, it's usually an indication that you're missing an opening <?php tag.
[eluser]polyvoid[/eluser]
You're right. I really must have been in need of sleep last night. But it still doesn't work. It gives me a blank page now...
[eluser]TheFuzzy0ne[/eluser]
Remove the closing PHP tag, as it probably has a space after it. You're encouraged not to use a closing PHP tag at the end of your file for this reason.
[eluser]polyvoid[/eluser]
Thanks a lot for your help fuzzy :-) I doublechecked every php file that is needed and according to me everything has no ending tags. I uploaded my system files here if you want to have a look: http://www.mediafire.com/?3cnmkym4nqd This is fresh ci install with that internationalization plugin and a few test views. nothing fancy at all but I can't get it work apperantly. Thanks a lot!!
[eluser]TheFuzzy0ne[/eluser]
Are you loading the database class? If so, remove it so it doesn't load, and see if that helps. Database misconfiguration is another known cause for blank pages. EDIT: Also, please try not to publish the username and password for your database if you can help it. There are some very naughty people around.
[eluser]polyvoid[/eluser]
Hi, I'm not loading the database class (as you can see in the files I've uploaded) in autoload.php The values (username/pas) which are in the database.php file are dummy, and of no use as I don't load the database. Please check the files I've uploaded. I don't get it why it's not working? Thanks!
[eluser]TheFuzzy0ne[/eluser]
Your default controller is set to "test", and should be set to "home" (see ./system/application/config/routes.php). In the home.php file, the view you're calling doesn't exist.
[eluser]polyvoid[/eluser]
the home.php file was a remaining of a previous test. in the routes.php file I referred to the test controller which has everything in it to load the internationalization controller (as it stood in the wiki). So that is correct I think. You can safely delete the home.php file as I do not refer to it anywhere. Still, the problem persists then. I still get a blank page... Maybe can you try out the internationalization as stated in the wiki in a fresh CI install, and if it works send me your files. Thanks a lot!
[eluser]TheFuzzy0ne[/eluser]
Try capitalising the first character of the "test" class and it's constructor. |
Welcome Guest, Not a member yet? Register Sign In |