Post by Redblob » Tue Feb 24, 2009 10:25 pm

Hi,
I want make a link from another site directed to Opencart and I want to go in the home page with a specific language.

What I must specify in the address link ? ( http://www.mysite.example/opencart/index.php?......... )

Thanks for help.

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by Redblob » Wed Feb 25, 2009 1:04 am

I have tried

"http://www.__.com/index.php?route=common/home&language=de"

but don't work.

What is wrong ?

Thanks

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by liquidpele » Wed Feb 25, 2009 2:30 am

catalog/controller/module/language.php

add something like this:

Code: Select all

        if(isset($_GET['language'])){
                $this->language->set($_GET['language']);
                $this->redirect($this->url->http('common/home'));
        }

I don't think he processes $_GET items through the $this->request stuff, so I just looked for it manually....

New member

Posts

Joined
Mon Feb 23, 2009 11:58 pm

Post by Redblob » Wed Feb 25, 2009 3:55 am

Sorry but I don't understand,

there isn't a way to make a link from an external page with language selection ?

( is not possible to "post" the language variable from an external link ? )

thanks.

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by liquidpele » Wed Feb 25, 2009 4:00 am

If you didn't understand my post, then you don't know php well enough to edit it manually.
Without editing the php it's not possible in the current release.

New member

Posts

Joined
Mon Feb 23, 2009 11:58 pm

Post by Redblob » Wed Feb 25, 2009 4:15 am

But when a spider catch all pages of a site it get also the information about page language.
For example when you click on the link showed by google you are redirect on the right page with the right language.
What are the informations that google use to redirect on the correct page ?

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by liquidpele » Wed Feb 25, 2009 4:17 am

Maybe it allows it with the SEO options, I don't use those though...

New member

Posts

Joined
Mon Feb 23, 2009 11:58 pm

Post by Redblob » Sat Feb 28, 2009 12:27 am

I have tried a thing.

I have searched some words in English on Google to find my site.
Google has showed me the page with my words ( in English ).
I have click on the link and google redirect me on the italian page !!!!!

This means that every time an english visitor search me on Google he is redirect on the italian home page ( because in my site the italian language is the default ! )

This is a big problem for all sites that use Opencart with multilanguage option active.
In other words is not possible to have visitors that go in the right language page when they came from a search engine !

There is a solution for this ?

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by Blueforce » Sat Feb 28, 2009 8:59 am

Hi Guys,

I actually think that OpenCart detects the users browser language and if that language is installed then it uses that, othervice it selects the "default" language. Please correct me if i'm wrong!

Best regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden

Post by Redblob » Sat Feb 28, 2009 4:39 pm

May be Opencart detect the browser language but the problem is another.

If I search a product, for example a "green chair" I go on Google and I write "green chair".
Google show me all possibile links to sites with these word.

Now I click on one of these link ...... Google redirect me on Opencart.
But if the default language of Opencart is for example Italian the visitor go on the page "green chair" translated in Italian.

The problem is that the visitior don't know Italian and click on English flag ( he is english and he want the "green chair" in English ! )

Now He go on the home page of Opencart in English but He don't know what is the location of "green chair" on the tree menu and must search it an all possible page !!!!!

I think that this way to publish the products on Opencart in multilangage page is not good.

Please tell me your opinion.

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by Daniel » Sat Feb 28, 2009 6:33 pm

I have only read the last post so here goes.

OpenCart has language detection. If a user is using italian and you have a site with italian language he will be show the page in italain. Make sure you have set the local up properly on the language page.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Redblob » Sat Feb 28, 2009 6:58 pm

Hi Daniel,

The local property is set on correct language.
But the problem is not the local property.
The problem is to go in the right page when there is a link from an external page ( see the previous topics ).

If I want publish my site I must buy some external links ( banner, adwords, external link ).
So I will buy some advertising links from english sites and some from italian sites.

How can I redirect the visitor on the right language page on my opencart shop ?
There are a lot of situation where I have installed the italian language on my web browser but I search products in English or vice-versa.

Is not restrictive to set up the opencart language with automatic detection ?
Some others e-commerce cart set the language with the classic public tag "?language=en" ( sorry but I'm not a php expert .... I don't understand why you have choose this way to set the language .... is better than others ? )

I have forgot a thing ..... if I send a mail with a link to my site I must redirect the visitor to a specific page with a specific language .... in this situation opecart set the language in automatic with the setting of customer browser ( is not a good situation !)


Thanks for you help and patience.

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by Daniel » Sat Feb 28, 2009 9:25 pm

Why would a customer want to visit a page that is not in his language?

Goto Admin/Setting/Localisation/Language.

Now you say you have 2 languages english and italian. Goto both of these languages and tell me what you have put in the field Locale.

For english you might have:
en_US.UTF-8,en_US,en-gb,english

For
"it" Italian(Standard)
"it-ch" Italian(Switzerland)

Checkout this page with all the code on:
http://www.brandonitconsulting.co.uk/mo ... age-codes/

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Redblob » Sat Feb 28, 2009 9:55 pm

Dear Daniel,

In Locale settings I have :
it_IT.UTF-8,it_IT,it-it,italian

But OpenCart work good .... is not a problem in language settings .... all work good in my site

I want explain better .

There are situation where an italian customer search the products on Google using English Key words ( is normal for technologic products ). And there are a lot of customer that prefer to surf on English section of sites because there are more informations and not always there are a corresponding translation in Italian ( I'm one of these).
But they have Windows in Italian and they have browser in Italian.
Is only a better way to find the informations ...... English is a must for all technical reference (and this situation is the same for all languages that are not widely diffused )
In the same time there are customers that prefer to surf in Italian because don't know English or are not able to read all technical pages.

With your choise all Italians that want to surf in English they can't .... OpenCart choose automatically the language and if you switch from Italian to English you loose the page where you are now because it go in home page.

Also if I make a mailing list to my customers and I link the mailing to english sections if my customer has an Italian browser he go automatically in Italian ( but he ask me to send the english reference )

I don't know if I have explained the problem ... is not a bug but I think is a wrong way to manage the languages in a multilanguage site.

P.S. Excuse me for my not perfect english ..... I will improve it ! ;)

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by liquidpele » Sat Feb 28, 2009 10:04 pm

Well... not sure if you would want to do this or not... but you theoretically could take the language setting from google... searching and getting my site gives me a referrer with the google language setting.

Code: Select all

$_SERVER[HTTP_REFERER] => http://www.google.com/search?q=xxx&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a

and from google.cn I get this:

[HTTP_REFERER] => http://www.google.cn/search?hl=zh-CN&q=xxx&btnG=Google+%E6%90%9C%E7%B4%A2&meta=&aq=f&oq=

and google.fr:

[HTTP_REFERER] => http://www.google.fr/search?hl=fr&q=xxx&btnG=Recherche+Google&meta=&aq=f&oq=

Sure would be a PITA to do though....

New member

Posts

Joined
Mon Feb 23, 2009 11:58 pm

Post by Redblob » Mon Mar 02, 2009 5:52 pm

Probably I'm not able to explain correctly my problem.
I try in other words.

I need to send a mail to my customer with a link to an English page.
My customer has Italian browser and Italian operative system but I need to show the English page of a product bacause the English page has more infomations and more technical data than Italian page.

How can I do ?

Thanks.

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by Redblob » Tue Mar 10, 2009 1:46 am

Hi,

Nobody can help me around this problem ?
I'm the only that have this problem ?

New member

Posts

Joined
Sun Feb 08, 2009 1:09 am
Location - Italy

Post by liquidpele » Tue Mar 10, 2009 5:27 am

I already posted how you could probably do that....

http://forum.opencart.com/viewtopic.php ... 218#p15947

New member

Posts

Joined
Mon Feb 23, 2009 11:58 pm

Post by nde » Tue Mar 10, 2009 8:23 am

Just a general question: why would you want Italians to read your pages in english?

It seems to me that the way it is right now is quite perfect: any Google search using terms in english redirects native italian speakers to pages in their language (if they exist). Now you want them to read the page in english instead?

nde
New member

Posts

Joined
Sat Jun 30, 2007 7:32 am

Post by Blueforce » Tue Mar 10, 2009 10:17 am

Hi Guys,

You could do a small change in /catalog/controller/module/language.php to keep the page you are on instead of beeing redirected to home when changing language.
Please keep in mind!! - It works but I haven't yet checked if there is a "downside" by doing this!!

The changes you have to do is:
Add this below line 3
$newlnk = str_replace('/index.php?route=','',$_SERVER['REQUEST_URI']);
Like this:
protected function index() {
$newlnk = str_replace('/index.php?route=','',$_SERVER['REQUEST_URI']);

Change this on line 7 ( now 8 ) to:
From:
$this->redirect($this->url->http('common/home'));
To:
$this->redirect($this->url->http($newlnk));

And this on line 16 ( now 17 )
From:
$this->data['action'] = $this->url->http('common/home');
To:
$this->data['action'] = $this->url->http($newlnk);

There are probably much better ways to do this - this is just a "quick workaround" to stay on page when changing language. And once again... I haven't yet checked if there are "issues" with these changes.
This is just some guidelines for those who need it urgently!
Please give me your thoughts about this.

Regards,
Leffe

New member

Posts

Joined
Thu Feb 12, 2009 7:11 am
Location - Sweden
Who is online

Users browsing this forum: No registered users and 90 guests