Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 General
 Off topic, News and Updates
 Language File Problems
Author « Topic »  

Vince
Administrator

Spain
42466 Posts

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 Software
Click Here to sign up for our newsletter
Click Here for the latest updater
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000