Hi,

I've been working myself through the available patches to make the boost module i18n aware (and friendly) and still have one major issue I can't figure out.

First of all, big thanks and hands down for making this module available for the community. After working on projects using Drupal for years I have to give Boost 9.5 stars (out of 10; along with CCK, Ubercart and ) for being one of the most useful tools for traffic sensitive websites there is.

In a current case I'm using i18n to handle several different languages on a drupal 5.9 driven website.
To get a better relationship between boost and i18n I followed the very helpful description of http://www.developmentseed.org/blog/2008/oct/23/improving-drupals-perfor... and applied/changed the following:
- Support locale and multilanguage sites #196266: Support locale and multilanguage sites - 5.x
- Remove symlink creation. Let each path have own file [#174380#comment-663794]

The only thing Ian didn't really cover in his blog is how they managed to get boost to play nice with the automatic language handling of the frontpage in i18n. Boost on default, it seems, creates an index.html in the cache directory which is language independent and therefor it messes around with any attempet of i18n to handle the specific language which is requested for the frontpage.

As an example:

http://www.example.com -> cache/www.example.com/0/index.html
http://www.example.com/en -> cache/www.example.com/0/index.html
http://www.example.com/de -> cache/www.example.com/0/index.html
http://www.example.com/fr -> cache/www.example.com/0/index.html
http://www.example.com/en/englishfrontpage.html -> cache/www.example.com/0/index.html
http://www.example.com/de/germanfrontpage.html -> cache/www.example.com/0/index.html
http://www.example.com/fr/frenchfrontpage.html -> cache/www.example.com/0/index.html

As you can see all the different requests for different language versions of the frontpage return the same cached file index.html even though I can see that there are different files in the cache directory:
cache/www.example.com/0/index.html
cache/www.example.com/0/en.html
cache/www.example.com/0/fr.html
cache/www.example.com/0/de.html

I should mention that in this case I also use i18n variables in the settings.php to define the apropriate page call for the different pages depending on the language:
$conf['i18n_variables'] = array('site_frontpage');

I also noticed that the guys of http://standagainstpoverty.org use a different link to switch the language (http://www.standagainstpoverty.org/es/i18n_homepage_router/fr) which looks to me they've written a separate module to handle the language switch request. If thats the case I would really appreciate any pointers to how to handle this issue.

Comments

fuzzydru’s picture

Anyone?

slantview’s picture

For divx.com, be it good / bad / indifferent, I added a rewrite rule to apache to always rewrite to /en. We have a simple selector at the top so I'm sure people can figure it out. We then cache only the homepage nodes. So I had to manually add symlinks for some reason to cache/www.divx.com/en.html -> node/xxx.html and fr -> node/yyy.html. But I am using the 6.x version which seems to be a little buggy at this point anyway.

Anyway our homepage is the only page we really needed to do full page cache with. So I hope this helps.

fuzzydru’s picture

Well, what I did in my case now was to create a theme template "page-front.tpl.php" in which I hacked the links for the language selections (flags) manually so they would point to /en, /fr and /de.
This does the trick for most parts but I'm still missing the browser-language-detection feature of i18n. Now the website always comes up with the default system language /en for anonymous users.

Would be nice to have the browser detection back in place as well. ;)

mikeytown2’s picture

Status: Active » Closed (duplicate)

This issue removes all symlinks; merging all symlink issues into this one.
#174380: Remove symlink creation. Let each path have own file
Set this back to active if I'm mistaken