Hello,
I have created a full e-comm site which uses multi-language fields in the database to allow all of the products to be displayed in 1 of 5 languages. This is no problem and completed. However, for the static pages, page titles etc I need to store the copy in 5 languages. I am currently doing this using flat file xml files and pulling the xml into an array then displaying the correct element depending on the language, eg:
Then displaying like so:
Now this all works fine and dandy, my question is; is this a viable scalable way of solving this problem? Obviously there are a million other ways to do the same thing, but I'm concerned about getting this right with regards to scalability and performance. The model has been simplified somewhat for display here before anyone criticises my xml or code techniques!
-Geeeeeeeeeeeeeeeeeeeeeeee-
-=
I have created a full e-comm site which uses multi-language fields in the database to allow all of the products to be displayed in 1 of 5 languages. This is no problem and completed. However, for the static pages, page titles etc I need to store the copy in 5 languages. I am currently doing this using flat file xml files and pulling the xml into an array then displaying the correct element depending on the language, eg:
Code:
<xml>
<title_en>English Title</title_en>
<title_fr>French Title</title_fr>
<title_de>German Title</title_de>
...
</xml>
Then displaying like so:
Code:
<h1><?php echo $xml['title_'.$_SESSION['lang']]; ?></h1>
Now this all works fine and dandy, my question is; is this a viable scalable way of solving this problem? Obviously there are a million other ways to do the same thing, but I'm concerned about getting this right with regards to scalability and performance. The model has been simplified somewhat for display here before anyone criticises my xml or code techniques!
-Geeeeeeeeeeeeeeeeeeeeeeee-
-=