I am creating a site that has different language versions and the requirement from the client is that all language versions are:
- A different site on a Multisite setup
- They all have address like this: mysite.com/en
Since the main site is in english, it’s address actually has to be mysite.com/en, not just mysite.com
If possible, I wouldn’t want to make a redirect from the main site to just a subsite that has the address mysite.com/en, but would like to use the actual mainsite with the subdirectory address?
Reasons: admin interface & database are cleaner + consistency.
No, not without major refactoring and lots of custom rewrite rules. The thing just isn’t geared to do that without some restructuring.
Is it possible? Sure.
Would it be clean and easy? Not even a little bit.
The new version of WordPress (3.5) will allow that. They published a beta a few days ago
Info: http://wordpress.org/news/2012/09/wordpress-3-5-beta-1/
The easiest solution I have found and implemented is the one explained here.
http://www.ab-weblog.com/en/wordpress-multisite-redirect-users-based-on-their-browser-language/
I know time is ever so scarce so I’ll also outline the solution.
1. create a folder in themes
2. insert index.php with the first code found in the above link, changing languages appropriately
3. create style.css and copy the second code found in the above link
4. activate this dummy theme on your main site
What happens now is that anyone going to site.com would be redirected to either site.com/en and site.com/ja depending on the language settings of the browser. Totally bypassing site.com
Now I just habe to figure out how to do an “if else” statement and have the website default to the en
Thank you