Multiple Languages

happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Multiple Languages

Post 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.
admin
Site Admin
Posts: 37995
Joined: Wed Sep 10, 2008 11:43 am

Re: Multiple Languages

Post by admin »

Do you have FR language in admin ?
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Multiple Languages

Post 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 )
admin
Site Admin
Posts: 37995
Joined: Wed Sep 10, 2008 11:43 am

Re: Multiple Languages

Post 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.
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Multiple Languages

Post 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.
admin
Site Admin
Posts: 37995
Joined: Wed Sep 10, 2008 11:43 am

Re: Multiple Languages

Post by admin »

If it works that it's fine.
Let's test it when it doesn't )
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Multiple Languages

Post 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.
admin
Site Admin
Posts: 37995
Joined: Wed Sep 10, 2008 11:43 am

Re: Multiple Languages

Post 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.
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Multiple Languages

Post 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
admin
Site Admin
Posts: 37995
Joined: Wed Sep 10, 2008 11:43 am

Re: Multiple Languages

Post 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.
Don't forget to run script update
Post Reply