Translating multilingual websites the easy way
28 January 2009 | Category: Code | Tags: content, multilingual, PHP | 3 Comments
One of the biggest challenges in web development is making multilingual websites. The easy part is having common functionality across all available versions. The hard part is making sure you don’t have blank spots. And that means that if you got an English-French website, you shouldn’t have French words appearing in the English version and vice versa.
Read the rest of the post »
Templates in CodeIgniter
9 January 2009 | Category: Code | Tags: Code, CodeIgniter, PHP, Projects | 1 Comment
One of the most annoying stuff for CodeIgniter developers is to include a header/footer/etc part in each and every view. CodeIgniter out of the box does not include template support (in the sence of a Joomla template or Wordpress theme). I have created a small library to assist you in using “templates” in CodeIgniter.
Download
Download Templates for CodeIgniter 0.1
How to use
1) First copy the file MY_loader.php to your application/libraries folder.
2) Check the example folder to see how a template should look like.
3) Simply do:
$this->load->template('template_name', $data); $this->load->view('view_name', $data);
The template loading is done in pretty much the same way as the views loading. However please read the comments inside the MY_loader.php file. It takes one minute and you’ll get the whole picture about how you can pass $data arrays containing variables.
RSS feed
Twitter
Delicious
Facebook
Last.fm