Post by jamosdesign » Thu Jan 28, 2010 9:04 pm

I'm working for a client that needs a bi-langual webshop (French/Dutch). I managed to configure the whole shop in both languages and everything works fine. Now, the customer got back to me and he would like to remove the language selector from the header and he wants to make it "dependent" on the URL. For example, if you surf to example.com/french/, then the French version of the site should be displayed and when you surf to example.com/dutch/, the dutch version should be displayed. Is this possible with OC ? Anybody that can point me into the right direction ?

Newbie

Posts

Joined
Thu Jan 28, 2010 8:51 pm


Post by skimmas » Fri Jan 29, 2010 1:14 am

I'm trying to do something quite similar. I want to have 2 links on each page one for each language. And but I didn't want my theme to be javascript dependent, the problem is that the controller expects an post variable, and I'm almost sure that if I start hacking the controllers I'll lose the ability to properly upgrade the software.

The code I'm talking about can be found at catalog/controller/common/header.php line 4

Newbie

Posts

Joined
Fri Jan 29, 2010 12:56 am

Post by Qphoria » Fri Jan 29, 2010 4:21 am

This was easily done in 1.3.4 and earlier with my Improved Language Library that supported passing in the language code in the url. But 1.4.0 has some crazy ass changes for language that make no sense to me, so its a much more complex process.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by readyman » Fri Jan 29, 2010 4:49 am

Look in the top index.php file - a lot of the language code seems to have been moved there. You might be able to manipulate that to suit your URL requirements.
I did notice that a lot of the modules require a config->language reference now instead of just language get id - I haven't worked it all out yet.

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by Qphoria » Fri Jan 29, 2010 5:38 am

yea It was moved there but its stupid imo.. a simple class edit becomes a multi-file mayhem.
Nothing in the $config class should be changed on the fly.. that defeats it being called "config"

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 1 guest