Language home pages
Dec 1, 2010 8:26 pm by jgkiefer
Dec 1, 2010 8:26 pm by jgkiefer
How would I build a home page for different languages in Joomla?
mysite.com/de
mysite.com/fr
Etc.
Re: Language home pages
Dec 1, 2010 8:29 pm by Edvard
Dec 1, 2010 8:29 pm by Edvard
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/
Re: Language home pages
Dec 1, 2010 9:03 pm by jgkiefer
Dec 1, 2010 9:03 pm by jgkiefer
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.
Re: Language home pages
Dec 1, 2010 9:25 pm by Edvard
Dec 1, 2010 9:25 pm by Edvard
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.
Re: Language home pages
Dec 1, 2010 10:45 pm by jgkiefer
Dec 1, 2010 10:45 pm by jgkiefer
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?
Re: Language home pages
Dec 2, 2010 10:15 am by Edvard
Dec 2, 2010 10:15 am by Edvard
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.
Re: Language home pages
Dec 2, 2010 2:24 pm by jgkiefer
Dec 2, 2010 2:24 pm by jgkiefer
Thank you very much for helping me. I will try the above and let you know how it goes.
Re: Language home pages
Dec 2, 2010 2:56 pm by jgkiefer
Dec 2, 2010 2:56 pm by jgkiefer
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?
Re: Language home pages
Dec 2, 2010 2:58 pm by Edvard
Dec 2, 2010 2:58 pm by Edvard
You don't need to create de folder and you shouldn't do that. It can be placed anywhere on your site.
Re: Language home pages
Dec 3, 2010 1:48 am by jgkiefer
Dec 3, 2010 1:48 am by jgkiefer
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
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.
Re: Language home pages
Dec 3, 2010 10:11 am by Edvard
Dec 3, 2010 10:11 am by Edvard
To rewrite de to index_de.html you need to write this before # gtranslate config
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
Re: Language home pages
Dec 3, 2010 3:17 pm by jgkiefer
Dec 3, 2010 3:17 pm by jgkiefer
Thank you!
SIMILAR TOPICS
Large numbers of crawl errors with double language code | Jan 24, 2019 1:43 am | Replies: 1 | Post by: natastna2 |
Translate website to any specific language, on page load | Jan 19, 2019 6:49 am | Replies: 1 | Post by: Leaon7756 |
Graphic translation for every language is missing | Dec 19, 2018 7:54 am | Replies: 1 | Post by: Daryl Dixon |
How to remove mobile Language Select Button transparency | Dec 5, 2018 10:06 pm | Replies: 10 | Post by: JeffTR |
Change language automatically | Nov 26, 2018 9:29 pm | Replies: 3 | Post by: Antilb |