Hi, I run a multilanguage site that has an SSI called languages.asp That include is basically a case select where I put things like this Case select language case "en" .... case "pt" .... case "es" ... etc The problem is that the file is about 100kb and it is included in every single page of the site... Is there a way to cache this file? Or any other option to solve this problem? Thanks
There are other options, you can create localized versions of the site in their own directories i.e. domain.com/en/index.php (english), domain.com/jp/index.php (japanese), etc. Also, consider one file per language to decouple the dependencies to the other languages (you are experiencing this problem now, all languages are dependent on each other because they share the same file). I have not implemented multi-language support in the past, so I would probably download a localized application (any language) and review the design. Why reinvent the wheel?
It looks like since you have a case statement already that contains the language, why dont you just separate that further into another include for the actual content? Include the case statement first the checks for the language you are using, then inside each statement, have another include that loads the localized text for that case.