Page 2 of 7
Re: Multiple Languages
Posted: Mon Aug 01, 2016 8:09 am
by happydg
When i add print_r($_GET); into common.php and go to
http://domain.com/fr/category/Babe/ it outputs [force_lng] => fr but when i go to
http://domain.com/es/category/Babe/ it outputs [force_lng] => fr but i notice it also outputs [link] => images/force_lng=es
This is my rewrite:
Code: Select all
RewriteRule ^category/([^/]+)/$ /kli/cgi/out.php?link=images/%{QUERY_STRING}&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_name=$1&order=ctr [L]
If i add & after link=images it seems to work, is this a correct url rewrites?
Code: Select all
RewriteRule ^category/([^/]+)/$ /kli/cgi/out.php?link=images/&%{QUERY_STRING}&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_name=$1&order=ctr [L]
Thank you.
Re: Multiple Languages
Posted: Mon Aug 01, 2016 12:14 pm
by admin
Do you have FR language in admin ?
Re: Multiple Languages
Posted: Mon Aug 01, 2016 12:18 pm
by happydg
Yes and it is my country it's why it redirects to fr.
But my question is, is it a valid url rewrite? I added & after link=images/ and it redirects languages correctly.
Code: Select all
RewriteRule ^category/([^/]+)/$ /kli/cgi/out.php?link=images/&%{QUERY_STRING}&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_name=$1&order=ctr [L]
This is what print_r($_GET); outputs:
Array ( [link] => images/ [force_lng] => es [url] => content [p] => 100 [skip_to_cookie] => true [skip_sell] => true [group_name] => Sex [order] => ctr ) Array ( [link] => images/ [force_lng] => es [url] => content [p] => 100 [skip_to_cookie] => true [skip_sell] => true [group_name] => Sex [order] => ctr [group_id] => 1934 )
Re: Multiple Languages
Posted: Mon Aug 01, 2016 3:24 pm
by admin
Sorry, I mean ES
I'm not 100% sure as I need to setup something like you have to test it but if it works - then it's fine.
Re: Multiple Languages
Posted: Mon Aug 01, 2016 3:54 pm
by happydg
Yes i have ES language in the admin and it works without url rewrite and with url rewrite with &
Please let me know the result of your test.
Thank you.
Re: Multiple Languages
Posted: Tue Aug 02, 2016 7:21 am
by admin
If it works that it's fine.
Let's test it when it doesn't )
Re: Multiple Languages
Posted: Fri Aug 05, 2016 4:41 pm
by happydg
Language translation doesn't work on this page domain.com/de/search/query/sexy/ctr/1/ and other pagination pages.
It's not in german but still in french ( my language ) with the default url rewrite:
Code: Select all
RewriteRule ^search/(.*)/(.*)/(.*)/(.*)/$ /kli/tube/index.php?search_type=$1&search=$2&order=$3&page=$4
I tried to change to this url rewrite:
Code: Select all
RewriteCond %{QUERY_STRING} ^(.+)$
RewriteRule ^search/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /kli/cgi/out.php?link=images/&%{QUERY_STRING}&url=content&p=100&skip_to_cookie=true&skip_sell=true&search_type=$1&order=$3&page=$4&force_template=content_search [L]
RewriteRule ^search/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /kli/tube/index.php?search_type=$1&order=$3&page=$4&force_template=model_galleries&force_template=content_search [L]
Now the language problem is solved but the tag <!--SEARCH_QUERY--> outputs <!--SEARCH_QUERY--> itself and not a result.
What should be the write url rewrite?
Thank you.
Re: Multiple Languages
Posted: Sun Aug 07, 2016 8:37 am
by admin
RewriteRule ^search/(.*)/(.*)/(.*)/(.*)/$ /kli/tube/index.php?search_type=$1&search=$2&order=$3&page=$4
You don't pass &force_lng variable
You should add it somewhere in your rewrites, doesn't matter where exactly.
Re: Multiple Languages
Posted: Sun Aug 07, 2016 9:37 am
by happydg
Still doesn't work in domain.com/cs/search/query/lesbians/ctr/1/ it's still in french with this url rewrite:
Code: Select all
RewriteRule ^search/(.*)/(.*)/(.*)/(.*)/$ /kli/tube/index.php?search_type=$1&search=$2&order=$3&page=$4&force_lng
Re: Multiple Languages
Posted: Sun Aug 07, 2016 9:40 am
by admin
It's pretty straight forward: open URL w\o rewrites - if it work then there's an error in your rewrites
if it doesn't work w\o rewrite - then there's an error in the script.