Posted - 02/25/2021 : 04:06:48
Working through a problem with a client with a multi-lingual website, it seems there is a bit of a problem caused by the order of the includes files. The normal order is like this... include "vsadmin/db_conn_open.php"; include "vsadmin/inc/languagefile.php"; include "vsadmin/includes.php"; ...and that is good as when you define a language file entry in the includes.php file it can overwrite those previously defined in the language file. But, it also means that setting the $languageid in the includes.php file doesn't affect the language that is defined in the languagefile.php include. There are two ways around this. The easiest is to define $languageid somewhere in the db_conn_open.php file as that comes before the languagefile.php include. The second way is to just change the language file include line to whichever language you require... include "vsadmin/inc/languagefile.php"; to that of the language you require, for instance include "vsadmin/inc/languagefile_en.php"; // For English ...or... include "vsadmin/inc/languagefile_fr.php"; // For French ...or... include "vsadmin/inc/languagefile_es.php"; // For Spanish (For very high volume websites this is actually more efficient as the store doesn't need to access the database to see what language is being used.) Vince Click Here for Shopping Cart SoftwareClick Here to sign up for our newsletterClick Here for the latest updater
|