Internationalization Views i18n -> problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Internationalization Views i18n -> problem (/showthread.php?tid=16495) Pages:
1
2
|
Internationalization Views i18n -> problem - El Forum - 03-08-2009 [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!! Internationalization Views i18n -> problem - El Forum - 03-08-2009 [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. Internationalization Views i18n -> problem - El Forum - 03-09-2009 [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... Internationalization Views i18n -> problem - El Forum - 03-09-2009 [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. Internationalization Views i18n -> problem - El Forum - 03-09-2009 [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!! Internationalization Views i18n -> problem - El Forum - 03-09-2009 [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. Internationalization Views i18n -> problem - El Forum - 03-09-2009 [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! Internationalization Views i18n -> problem - El Forum - 03-09-2009 [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. Internationalization Views i18n -> problem - El Forum - 03-10-2009 [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! Internationalization Views i18n -> problem - El Forum - 03-10-2009 [eluser]TheFuzzy0ne[/eluser] Try capitalising the first character of the "test" class and it's constructor. |