Page 1 of 3
Changing languages
Posted: Tue Jul 18, 2017 10:22 am
by filthlab
Hi,
I had a problem with changing languages - when I have changed the language I were always redirected to the main page rather then staying on the current page.
Like you suggested I have fixed this with:
http://domain.com/de/$_SERVER['REQUEST_URI']
But now I have another problem - if I change the language for the second time I'm getting an url, like this:
http://domain.com
/es/de/category/amateur/. And if I change the language for the third time, the url is: http://domain.com
/it/es/de/category/amateur/
How can I fix this?
Re: Changing languages
Posted: Tue Jul 18, 2017 11:03 am
by admin
Lat's say you edit template content_list
so you have a link
/category/<!--CATEGORY_NAME-->/
for links to other languages just link to
/es/category/<!--CATEGORY_NAME-->/
/de/category/<!--CATEGORY_NAME-->/
and so on
Re: Changing languages
Posted: Thu Jul 27, 2017 8:09 am
by filthlab
There is no problem with the linking.
Just visit
http://filthlab.com/, change the language several times (not just once) and check the address bar to see what I mean.
Re: Changing languages
Posted: Thu Jul 27, 2017 4:03 pm
by admin
Did it - look ok
Can you please explain what's wrong ?
Re: Changing languages
Posted: Thu Jul 27, 2017 6:07 pm
by filthlab
After several changes of the language, I'm getting the next url in the address bar:
http://filthlab.com/sv/pt/no/it/es/cs/
See the attached file, please.
Re: Changing languages
Posted: Thu Jul 27, 2017 11:00 pm
by admin
How do you form url in template ?
Re: Changing languages
Posted: Fri Jul 28, 2017 6:47 am
by filthlab
<li id="lan-cs"><a href="/cs<?=$_SERVER['REQUEST_URI']?>">Čeština</a></li>
<li id="lan-da"><a href="/da<?=$_SERVER['REQUEST_URI']?>">Dansk</a></li>
<li id="lan-de"><a href="/de<?=$_SERVER['REQUEST_URI']?>">Deutsche</a></li>
<li id="lan-en"><a href="<?=$_SERVER['REQUEST_URI']?>">English</a></li>
and so on
Re: Changing languages
Posted: Fri Jul 28, 2017 3:46 pm
by admin
Did you read the second message in this thread ?
Re: Changing languages
Posted: Sat Jul 29, 2017 6:01 am
by filthlab
Of course I did.
But the problem is not in links for categories, or pagination. I think the problem is in the links I'm changing the language with.
Re: Changing languages
Posted: Sat Jul 29, 2017 4:22 pm
by admin
hm... I said to make likes like
/de/category/<!--CATEGORY_NAME-->/
you say you have links like
<li id="lan-cs"><a href="/cs<?=$_SERVER['REQUEST_URI']?>">Čeština</a></li>
and at the same time insist that you've changed links ...
Looks like I don't understand something ..