VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Default language
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mmaillar
Starting Member

9 Posts

Posted - March 18 2008 :  19:38:43  Show Profile  Reply with Quote
Hi,

I have created my vp-asp first in French and then use the translation facilities to make it available in English. So I now have 2 languages available for my cart.

I now need to define the English as my primary language to make sure the English speaking customers are not lost when they access the site and access it in English from scratch.

The customer support told me that this is not possible "out of the box" and that I should make a specific development for that, is any of the forum member already went through this issue ?

Thanks in advance,
Marc.

devshb
Senior Member

United Kingdom
1898 Posts

Posted - March 18 2008 :  19:54:14  Show Profile  Visit devshb's Homepage  Reply with Quote
you could use an ip2location module to work out which country the user is from, and then use the value that it returns to set the language; it'd obviously have to be setup so that it only does that once on the user's initial load, and not every time they page.

There are lots of different 3rd party ip2location modules around that you could plugin; generally the more you pay the better the match. vpasp have one:

IP To country database for Access and SQL Server:
http://www.vpasp.com/sales/addons650.asp

and you can also get other classic asp based ones that you could easily plugin.

if you had that installed, then you could get some custom code created to get the relevant language loaded on the initial hit.

normally I'd say it'd be a great idea to do as an addon, but as different people use different ip2location software it probably wouldn't lend itself to a generic addon and would be more of a custom-created thing. should be quite easy to do though once the ip2location module's in place.

if all you want to do is change the default language from french to english, that'd be even simpler, but using the ip to work out the country would be a great thing to do for a multi-language site.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on March 18 2008 19:57:04
Go to Top of Page

mmaillar
Starting Member

9 Posts

Posted - March 18 2008 :  20:12:50  Show Profile  Reply with Quote
Hi Simon

Your help is very much appreciated. In fact, I just want to set the language to English for all users, even those who already got logged in by the past.

I tried to redirect all the main pages (default.asp, shopdisplayproduct.asp, shopdisplaycategory.asp) to shoplanguagesubs.asp, this works perfectly except for the Search Engines that do not like that kind of redirections. For instance, Google webmaster rejected my sitemap because of that... And all my google indexes are in French right now :-(

I am wondering how I could do it in a smarter way to not confuse the search engines.

Thanks for your advices,
Marc.
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - March 18 2008 :  20:45:21  Show Profile  Visit devshb's Homepage  Reply with Quote
yes; you definitely wouldn't want to redirect.

you should be able to do it by changing the xlanguage config option, I think it needs to be uppercase on that config option, eg you'd set it to:

ENGLISH

whether or not that changes the language for people who already had sessions/cookies prior to the time you changed it, I'm not sure, if not then that aspect could be sorted out by adding a small chunk of code to the bottom of shop$db.asp, something like:

(but backup your shop$db.asp and shoplanguageset.asp files first)

1. Move (move, don't just copy) the loadlanguagevariablesSession function from shoplanguageset.asp into shop$db.asp and then do the same for the LanguageSetVariablesNodb function.

2. Add this to the bottom of shop$db.asp:

<%
if (GetSess("forcedlanguagereloaded")="" or IsNull(GetSess("forcedlanguagereloaded"))=true) then
Setsess "Language","English"
loadlanguagevariablesSession "English"
SetSess "forcedlanguagereloaded","Y"
end if
%>


It's more awkward than it first appears because you need to make sure people can still use shoplanguageset.asp (ie no conflicts with what you do to shop$db.asp)

hopefully the above would work, but I haven't tried it.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on March 18 2008 20:59:44
Go to Top of Page

mmaillar
Starting Member

9 Posts

Posted - March 19 2008 :  13:22:35  Show Profile  Reply with Quote
This is excellent ! I did the code implementation and the problem is now solved !

Thanks you very much Simon ! very much appreciated.

Here is the vp-asp cart I recently did, if you want to have a look: http://www.comptoirdenfance.com

Best regards,
Marc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000