Install only in subdir

Popular automatic website translation tool

Install only in subdir

Postby Flow » Thu Oct 27, 2011 10:09 pm

Hi!

I just bought the pro version an have a little (I hope) question :)

I have an online shop at maindomain.com
this shop is already multilanguage, translated by hand. So this should stay like this. It also uses a subdir for each language.

I have a blog though, installed in /blog, on which I'd like to use gtranslate. Each language should have his own domain.

How can I install gtranslate to work only on this blog, and leave my shop alone?

If I put the redirect stuff in .htaccess in my main directory, I'm getting loop errors.

Hope you can help! Thanks in advance!
Flow
 
Posts: 15
Joined: Thu Oct 27, 2011 9:35 pm

Re: Install only in subdir

Postby linboyz » Fri Oct 28, 2011 12:53 pm

you can use this code:
<span class="notranslate"></span>

This will refrain from translating the content you wished to remain.
Hope it helps! (:
linboyz
 
Posts: 15
Joined: Thu Oct 20, 2011 7:47 am

Re: Install only in subdir

Postby Edvard » Fri Oct 28, 2011 8:48 pm

Hi,

You need to use this rewrite rules instead:

Code: Select all
# gtranslate config
RewriteCond %{REQUEST_URI} ^/blog
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteCond %{REQUEST_URI} ^/blog
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/blog
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_no_api=1 [L,QSA]
RewriteCond %{REQUEST_URI} ^/blog
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_no_api=1 [L,QSA]


So it will work only for blog directory.
Regards,

Edvard Ananyan - GTranslate Team

Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard
Site Admin
 
Posts: 2898
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Install only in subdir

Postby Flow » Sun Oct 30, 2011 9:08 pm

Thanks! With the new .htaccess code my shop works again. I'm still having trouble getting gtranslate to work in my blog though.

The widget is there, the buttons are there, but I get 404 pages. I think it might be because it's putting the language code like this:

maindomain.com/de/blog and not /blog/de
Flow
 
Posts: 15
Joined: Thu Oct 27, 2011 9:35 pm

Re: Install only in subdir

Postby Edvard » Mon Oct 31, 2011 5:31 pm

Make sure that you have installed it in your www root, not inside blog directory. Please check the troubleshooting for more info.
Regards,

Edvard Ananyan - GTranslate Team

Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard
Site Admin
 
Posts: 2898
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Install only in subdir

Postby Flow » Mon Oct 31, 2011 10:32 pm

I have installed in root.

I think it is because my shop also uses maindoman.com/XX for other languages.

Is it be possible to make the URL like maindomain.com/blog/XX ?

That would work I guess.
Flow
 
Posts: 15
Joined: Thu Oct 27, 2011 9:35 pm

Re: Install only in subdir

Postby Edvard » Tue Nov 01, 2011 4:34 pm

When you go to domain.com/gtranslate/translate.php?lang=ru&url=blog/&force_no_api=1 what happens?
Regards,

Edvard Ananyan - GTranslate Team

Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard
Site Admin
 
Posts: 2898
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Install only in subdir

Postby Flow » Tue Nov 01, 2011 10:46 pm

Then it works! I get my blog in Russian. Exccept for some headings and the menu :)

I also sent you a private mail with URL so yo can check it out
Flow
 
Posts: 15
Joined: Thu Oct 27, 2011 9:35 pm

Re: Install only in subdir

Postby Edvard » Wed Nov 02, 2011 1:10 am

Then you have something wrong in your .htaccess file. Can you post your .htaccess file located in www root folder?
Regards,

Edvard Ananyan - GTranslate Team

Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard
Site Admin
 
Posts: 2898
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Install only in subdir

Postby Flow » Wed Nov 02, 2011 12:02 pm

I sent it to you in a private mail. Thanks!
Flow
 
Posts: 15
Joined: Thu Oct 27, 2011 9:35 pm

Next

  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux