Jump to content

Dynamic Languages with CodeIgniter's Language System


Recommended Posts

So I am currently working on a website that is a business directory.  These listings are grouped by regions and categories.  My problem is that this website is going to be multilingual.  The regions and categories are stored in a database and I need to easily be able to both modify and access the language items based on the user's selected language.  I would prefer to store these names in CI's language files.


I've thought about creating a column in each table called "language index" so that would make it easy to call the items from the language file... for example  

foreach($query_categories->result_array() as $cat)
    $title = $this->language->item($cat['language_index']); 

But the bigger issue is editing the file if a category is modified or deleted(I can just add a new line to the end of the file if one is created).  What do you guys think would be the best way to store and modify names for different languages for each of these regions and categories?

Link to post
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.