Reputation: 12985
I have a site (let's call it finnish.com). I bought another domain, english.com. The idea is to have multilingual website. The sites are exactly same, but they obiously need language-specific information. I'm currently looking for the best way to do this. Probably it's htaccess. This is what I've tried:
RewriteEngine On
RewriteRule header.php$ header.php?lang=en [L]
However, this works as I manually visit header.php (which has the language-specific details), but if I include it through php, it doesn't work.
It would best, if selected files (no need to be dynamic; can be listed manually) would have a $_GET
-attribute on another domain.
Any ideas?
Martti Laine
Upvotes: 0
Views: 355
Reputation: 449435
I'm not sure whether it's what you need, but why not use $_SERVER["HTTP_HOST"]
to find out which domain the file is addressed under? Then you could switch languages automatically.
Upvotes: 1