Hi, I would like some advice on storing data for different languages on my website. I've spent hours searchin and can't seem to find what I need. Here's my situation, so let me know what you think.
I have a website that multiple users can log into to view and store information. I use php, Mysql, Apache, on a FreeBSD operating system (although during development right now its on my home box with Vista). I store some account information in the $_SESSION, but mostly use classes with local variables to store the data I need. I'll have anywhere from 2,000 to 6,000 users of the webapp, so I'm concerned about performance. I want to make this available in multiple languages. Some sites I've seen provide a dropdown list the user can select their language preference in, which I like.
I've got two options I thought of, but have no clue as to which is better, or if there is a better way to accomplish this. One would be to store the language specific data in the $_SESSION object. So, the user would log in, and based on the language preference the $_SESSION would be populated with the appropriate language text into the variables used throughout the webapp. This could mean I would have around 300 or so variables with string data (no objects)...such as $_SESSION['My_Title'] = "This is the title to my website, in english, or german, etc.". The other option would be to use CONSTANTS and define each CONSTANT in a config text file and load that file upon login based on the language preference set. I read somewhere that using CONSTANTS is somewhat slower than the $_SESSION, but the Session would use up more RAM.
Any ideas, or resources you could point me to? Thanks.