Welcome Guest, Not a member yet? Register   Sign In
How do I organise the texts for a site ?
#1

[eluser]chefnelone[/eluser]
I know how the Language Class works but I'm still a little confused about how to organise and where to save the 'texts' for my site.

All the tutorials regarding the Language Class are about 'error messages', 'notification messages', and so; and all of them are save in a file, let's say: system/language/english/error_lang.php and in a array like: $lang['error_email_missing'] = "You must submit an email address". So far so good.

But what about the other texts in the site. Consider I have a Services section which describes 5 services, each one with a 'title text' and a 'longer text'. The site has 2 languages views, then I have those texts in both languages English and Spanish.

Before using CI I used to store those texts in a data base recovering them depending on the 'language' selected for the user (stored in $_SESSION['lang']).

Since I must to have all the texts stored in a database. Then my question is:
Should I recover the database data from:
1- a file like: system/language/english/generalTexts_lang.php ?.
2- from a controller or model ?.

Which is the best way to do this so that if the site grows I'll be able to keep it controlled and well organised ?.




Theme © iAndrew 2016 - Forum software by © MyBB