Removing some languages from caching (pro version)

Popular automatic website translation tool

Removing some languages from caching (pro version)

Postby pr1970 » Wed Dec 17, 2014 5:20 pm

Hi

I have the following list of languages from my sitemap that i`d only like translated in the cache folders , as i have some 3500 pages in each cache folder. Can you explain what I need to change in the .htaccess file to only allow the following to be cached? Thanks alot.


http://www.####.com/en/
http://www.####.com/ar/
http://www.####.com/hy/
http://www.####.com/eu/
http://www.####.com/bg/
http://www.####.com/zh-CN/
http://www.####.com/zh-TW/
http://www.####.com/hr/
http://www.####.com/cs/
http://www.####.com/da/
http://www.####.com/nl/
http://www.####.com/tl/
http://www.####.com/fi/
http://www.####.com/fr/
http://www.####.com/ka/
http://www.####.com/de/
http://www.####.com/el/
http://www.####.com/iw/
http://www.####.com/hu/
http://www.####.com/id/
http://www.####.com/it/
http://www.####.com/ja/
http://www.####.com/ko/
http://www.####.com/lv/
http://www.####.com/no/
http://www.####.com/fa/
http://www.####.com/pl/
http://www.####.com/pt/
http://www.####.com/ro/
http://www.####.com/ru/
http://www.####.com/sr/
http://www.####.com/sk/
http://www.####.com/sl/
http://www.####.com/es/
http://www.####.com/sv/
http://www.####.com/th/
http://www.####.com/tr/
http://www.####.com/uk/
http://www.####.com/vi/

From my .htaccess file

# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
pr1970
 
Posts: 18
Joined: Thu Sep 29, 2011 3:22 pm

Re: Removing some languages from caching (pro version)

Postby Yana » Wed Dec 17, 2014 6:32 pm

Hi,
You can replace [a-z]{2}|zh-CN|zh-TW with the language codes which you want to use.

# gtranslate config
RewriteRule ^(en|ar|hy|eu|bg|zh-CN|zh-TW|hr|cs|da|nl|tl|fi|fr|ka|de|el|iw|hu|id|it|ja|ko|lv|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(en|ar|hy|eu|bg|zh-CN|zh-TW|hr|cs|da|nl|tl|fi|fr|ka|de|el|iw|hu|id|it|ja|ko|lv|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^(en|ar|hy|eu|bg|zh-CN|zh-TW|hr|cs|da|nl|tl|fi|fr|ka|de|el|iw|hu|id|it|ja|ko|lv|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(en|ar|hy|eu|bg|zh-CN|zh-TW|hr|cs|da|nl|tl|fi|fr|ka|de|el|iw|hu|id|it|ja|ko|lv|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|ar|hy|eu|bg|zh-CN|zh-TW|hr|cs|da|nl|tl|fi|fr|ka|de|el|iw|hu|id|it|ja|ko|lv|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^(en|ar|hy|eu|bg|zh-CN|zh-TW|hr|cs|da|nl|tl|fi|fr|ka|de|el|iw|hu|id|it|ja|ko|lv|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sv|th|tr|uk|vi)$ /gtranslate/translate.php?lang=$1
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4134
Joined: Thu Jan 12, 2012 6:21 pm

Re: Removing some languages from caching (pro version)

Postby pr1970 » Wed Dec 17, 2014 6:53 pm

Thats great, i`ll give it a try.

Thank you
pr1970
 
Posts: 18
Joined: Thu Sep 29, 2011 3:22 pm

Re: Removing some languages from caching (pro version)

Postby Yana » Wed Dec 17, 2014 11:58 pm

You are welcome!
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4134
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron