This one
/<?=$url_lng_prefix?>/category/<!--CATEGORY_NAME-->/
is in content_list. I do not have problem with it, it is working fine.
This one
<li id="lan-cs"><a href="/cs<?=$_SERVER['REQUEST_URI']?>">Čeština</a></li>
is in the header template. With these links I'm changing the language. Try to change the language several times and finally you will have some link like this:
.../sv/pt/no/it/es/cs/...
Changing languages
Re: Changing languages
You need to get rid of <?=$_SERVER['REQUEST_URI']?> and use the way I described earlier like
/es/<!--CATEGORY_NAME--> and so on
/es/<!--CATEGORY_NAME--> and so on
Don't forget to run script update
Re: Changing languages
You advise me to do like this. We had a private conversation about this.
My task:
My task:
Your answer:II. Language Pages
1. When you are in a category page or use a search and change the language you should stay in the same category page or search result in selected language. Generally, when you changing the language you should stay where you are, just the language should be changed. Now when you change the language, no matter where you are it redirects to the Homepage.
And it is working fine, except for the problem I described above.I guess now you have links like
htt://domain.com/de/
all you have to do is to change in template to
htt://domain.com/de/<?=$SERVER['REQUEST_URL']?>
Re: Changing languages
Yes, I did not foreseen this issue , that's why I recommend to change the way you form urls
Don't forget to run script update
Re: Changing languages
So, for this:
How do you suggest to form urls that the above condition is met?
We are at starting position.II. Language Pages
1. When you are in a category page or use a search and change the language you should stay in the same category page or search result in selected language. Generally, when you changing the language you should stay where you are, just the language should be changed. Now when you change the language, no matter where you are it redirects to the Homepage.
How do you suggest to form urls that the above condition is met?
Re: Changing languages
Template of a category page is in the "content_list" and search results are in "content_search", so we can use different urls in different templates, right ?
Don't forget to run script update
Re: Changing languages
Right, but I'm changing languages in the header template.
Re: Changing languages
You can use <!--TEMPLATE_NAME-->
if ('<!--TEMPLATE_NAME-->' == 'index') {
....
} elseif ('<!--TEMPLATE_NAME-->' == 'content_list') {
...
}
and so on
if ('<!--TEMPLATE_NAME-->' == 'index') {
....
} elseif ('<!--TEMPLATE_NAME-->' == 'content_list') {
...
}
and so on
Don't forget to run script update
Re: Changing languages
I'm not sure what do you mean. Can you be more specific.
Re: Changing languages
You create links in template 'header', right ?
Don't forget to run script update