Forum Moderators: coopster
our sites are in three languages which are more or less identical in structure and content.
we currently have hardcoded the translations into the php files - a real recipe for spaghetti code [webmasterworld.com] ;)
i am thinking about creating separate include files for each of the words and phrases used in each section (a bit like phpbb). these included files will be quite big, but i think the ease of maintenance and translation will outweigh the bloat.
i had also thought however of doing it in a db. that would allow unskilled translators to edit words and phrases. i could then cache the db results into an array and access them from there.
i just wondered what everyone else does and why?
many thanks
multi language just sucks
templating of some sort is probably the way to go, db or file doesn't matter too much, except that you have to set your default charset in your db and that could cause some insanity.
use a language setting in the session if it iis a logged in type thing
is it a static site (ie. just info)? is it forum or some kind of user gen content site? ecomm?
reason I ask is the needs of each are fairly different. I am liable to just serve it up pretty static if it is an info only site.
the site is static and templated. the main content is stored in a db and translated via cms, but there are many scripts such as send to a friend, submit reviews, etc which have lots of little "click here to do this" type of phrases.
i don't use sessions; each site is on a regional .tld (all on the same server).
i have never heard of setting the default charset on db?
as an example, can't i just store records:
Click here
Click aquí
i normally run all content through htmlentities() before storing in db? shouldn't that be ok?