Language home pages

Popular automatic website translation tool

Language home pages

Postby jgkiefer » Thu Dec 02, 2010 12:26 am

How would I build a home page for different languages in Joomla?

mysite.com/de
mysite.com/fr

Etc.
jgkiefer
 
Posts: 7
Joined: Thu Dec 02, 2010 12:24 am

Re: Language home pages

Postby Edvard » Thu Dec 02, 2010 12:29 am

Not sure I understand what exactly do you need.

Your home page will be automatically translated to German and the URL will be http://yoursite.com/de/
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Language home pages

Postby jgkiefer » Thu Dec 02, 2010 1:03 am

I don't want to miss out on hits and the /de etc. bypasses the home page. Also the translation breaks my homepage template. It would be better if I could assign a home page for each language.
jgkiefer
 
Posts: 7
Joined: Thu Dec 02, 2010 12:24 am

Re: Language home pages

Postby Edvard » Thu Dec 02, 2010 1:25 am

If you want to assign a custom page instead of your automatically translated page then you need to edit your .htaccess file to rewrite yoursite.com/de/ to your custom page.
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Language home pages

Postby jgkiefer » Thu Dec 02, 2010 2:45 am

Is it really that simple?
So if I change the htaccess file to point to say...
mysite.com/de/home.html then the Google pages will go there instead of the default home page?
That would be very cool.

What about the sitemap?
jgkiefer
 
Posts: 7
Joined: Thu Dec 02, 2010 12:24 am

Re: Language home pages

Postby Edvard » Thu Dec 02, 2010 2:15 pm

Not sure if you understood me correctly. I'll try to be as simple as possible this time.

As I understand you want to change/customize yoursite.com/de/ page which is automatically generated by GTranslate.

For that you create a file somewhere in your server and make the modifications or whatever you write in it and call it let's say index_de.html

So you want the visitor/crawler to see index_de.html file when they access yoursite.com/de/ instead of automatically generated one.

For that you modify your .htaccess file to point yoursite.com/de/ to index_de.html.

The sitemap don't need to be changed in that case.
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Language home pages

Postby jgkiefer » Thu Dec 02, 2010 6:24 pm

Thank you very much for helping me. I will try the above and let you know how it goes.
jgkiefer
 
Posts: 7
Joined: Thu Dec 02, 2010 12:24 am

Re: Language home pages

Postby jgkiefer » Thu Dec 02, 2010 6:56 pm

Does the index_de.html have to be in the yoursite.com/de/ directory or can it be located anywhere as long as the htaccess points to it?
jgkiefer
 
Posts: 7
Joined: Thu Dec 02, 2010 12:24 am

Re: Language home pages

Postby Edvard » Thu Dec 02, 2010 6:58 pm

You don't need to create de folder and you shouldn't do that. It can be placed anywhere on your site.
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Language home pages

Postby jgkiefer » Fri Dec 03, 2010 5:48 am

This is harder than I expected.

What do I put in the htaccess to point to a specific file?
Example
How to get mysite.com/de to point to mysite.com/index_de.html

I do not understand the gtranslate htaccess code and do not want to screw anything up.

How to add to this
Code: Select all
        RewriteRule ^([a-z]{2})/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
        RewriteRule ^([a-z]{2})$ /gtranslate/translate.php?lang=$1 [L,QSA]
        RewriteRule ^(zh-CN)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
        RewriteRule ^(zh-CN)$ /gtranslate/translate.php?lang=$1 [L,QSA]
        RewriteRule ^(zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
        RewriteRule ^(zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]


I really appreciate your help with this. The more I learn the more I appreciate all your hard work on gtranslate - it is a work of art.
jgkiefer
 
Posts: 7
Joined: Thu Dec 02, 2010 12:24 am

Re: Language home pages

Postby Edvard » Fri Dec 03, 2010 2:11 pm

To rewrite de to index_de.html you need to write this before # gtranslate config
Code: Select all
RewriteRule ^de/$ /index_de.html [L]
RewriteRule ^de$ /index_de.html [L]

# gtranslate config
...


So when you access yoursite.com/de or yoursite.com/de/ you will see the contents index_de.html
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Language home pages

Postby jgkiefer » Fri Dec 03, 2010 7:17 pm

Thank you!
jgkiefer
 
Posts: 7
Joined: Thu Dec 02, 2010 12:24 am


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux