Page 1 of 2
language in url
Posted: Mon Apr 12, 2010 1:55 pm
by banane
I've appreciated in the last release (1.4.7) the possibility to setting the language from url appending the parameter &language=en
now I would like to know how to set opencart to have all the urls with the language parameter included by default (just a suggestion where to start).
Thanks!
Re: language in url
Posted: Mon Apr 12, 2010 2:47 pm
by Qphoria
If you set it once, it will use that for the rest of the session so if you goto:
www.site.com/index.php?language=en
then
www.site.com/index.php (it will still be in en)
if you goto
www.site.com/index.php?language=de
then
www.site.com/index.php (it will still be in de)
So you shouldn't need to keep it there.
Re: language in url
Posted: Mon Apr 12, 2010 3:10 pm
by banane
yes, but I would like to have a structure with unique urls
e.g. yahoo index the site in english, google in italian. I've provided the urls with the language parameter so they index also other languages but I've a lot of duplicated pages, so I was thinking that unique urls could simplify everything
Re: language in url
Posted: Mon Apr 12, 2010 9:43 pm
by Qphoria
With the old url library class, this could have been done easier. It was decided to remove the url class and now it limits things. So to do it, you will likely need to edit every single file and add it. So there is no longer a good way. I'll see about adding the url class back in as this is just one of many limitations that has occurred because of that decision and nobody has found any good in removing it.
Re: language in url
Posted: Tue Apr 13, 2010 2:42 am
by banane
thank you Qphoria
people like you gives me hope for a better Opencart, I'll wait for news
Re: language in url
Posted: Tue Apr 27, 2010 3:36 pm
by banane
does anyone know if we'll have back the old url library class in the next version?
thanks
Re: language in url
Posted: Tue Apr 27, 2010 10:56 pm
by Qphoria
I'd like to restore it and use it for SEO so that ALL links can be SEO'd dynamically. In ChromiumCart I added an SEO Generator that would actually generate the seo from the name
So
http://www.mysite.com/index.php?route=p ... duct_id=50
was something like:
http://www.mysite.com/product/product/ipod-nano
and
http://www.mysite.com/index.php?route=common/home
would be something like:
http://www.mysite.com/common/home
This would replace the model/tool/seo_url.php file which I've never liked anyway because it is very hardcoded and only works with products, categories, & information instead of being more universal.
Re: language in url
Posted: Sun Jun 05, 2011 1:03 am
by i2Paq
How does this work with 1.5.0?
For front and Admin?
Re: language in url
Posted: Mon Jun 06, 2011 8:42 pm
by xtr3mx7
Is Q giving back hope of having the URL class back, specifically, for multi site language users with SEO? That would be awesome if he can provide a guideline on how to restore it back! Cheers!
Re: language in url
Posted: Thu Jun 30, 2011 1:49 am
by mfive
Agreed. This is one of the main reasons I can't switch to OpenCart yet.
I need URLS like so:
http://www.domain.com/es/catalog
http://www.domain.com/fr/catalog
http://www.domain.com/it/catalog
for each language.
Having cookies dictate the language doesn't work for me, does this mean that I need to set up several separate stores? If so, can they tie into the same products database? Any suggestions?
Re: language in url
Posted: Wed Jul 13, 2011 4:07 am
by cyjambo
Hi,
Same here. Although I would need:
http://www.domain.com/en/catalog/product/apple
http://www.domain.com/de/kataloge/produkt/apfel
http://www.domain.com/hu/katalogus/termek/alma
Is this possible? I really want to use OpenCart but this is a problem for me as of now
Other than this OpenCart is awesome!!!
Re: language in url
Posted: Wed Jul 13, 2011 5:49 am
by levon
Re: language in url
Posted: Thu Oct 13, 2011 9:03 pm
by bull5-i
I'd also like to see such language switch support from OC.
Re: language in url
Posted: Thu Apr 26, 2012 5:52 am
by arames
Guys,
if the
index.php?language=en
or
index.php?language=de
is NOT switching to the language where could the error be?
I am using OpenCart 1.5.2.1
Pleeeeeeeeeeeeease any help on the right direction would mean a lot.
Thank you
Re: language in url
Posted: Thu Apr 26, 2012 9:55 am
by Qphoria
arames wrote:Guys,
if the
index.php?language=en
or
index.php?language=de
is NOT switching to the language where could the error be?
I am using OpenCart 1.5.2.1
Pleeeeeeeeeeeeease any help on the right direction would mean a lot.
Thank you
It was removed by daniel... I tried to fight him on it but he wouldn't budge.. I recommend complaining to him
For now you can follow this post to add it back
http://forum.opencart.com/viewtopic.php?t=57516#p272365
Re: language in url
Posted: Thu Apr 26, 2012 11:30 pm
by strtfr
I am currently investigating in how this could be (easily) achieved. Is someone able to give some leads to a possible solution?
Re: language in url
Posted: Thu Apr 26, 2012 11:39 pm
by arames
I am also dying to have this
http://www.domain.com/es/catalog
http://www.domain.com/fr/catalog
http://www.domain.com/it/catalog
but ONLY
QPHORIA can help us. And God of course
Hopefully one of them will post a message here to fix this, since it is very important for all of us to have google index our store in different languages / folders..
Re: language in url
Posted: Thu Apr 26, 2012 11:49 pm
by Qphoria
Well first you need to add the language url function back
that will give you
Code: Select all
http://www.mysite.com/index.php?language=de
Then I'm not sure but maybe using url rewrite to change
mysite.com/de/index.php
to
mysite.com/index.php?language=de
but I'm no pro on htaccess changes.
Re: language in url
Posted: Fri Apr 27, 2012 2:43 am
by strtfr
If we want to rewrite the url we have to make sure the language query string is being kept present in the url. In 1.5.3 it is filtered out once the language selection is made. Lets see.
Re: language in url
Posted: Fri Apr 27, 2012 5:12 am
by strtfr
Well, haven't got the slightest idea where to look for. I should probably add the language query string in the url parameter of every page served.