libvmod-i18n

This vmod normalizes and filters the incoming requests' Accept-Language headers and reduce them to just the languages your website or service supports.

This vmod is the newer, shinier version of my varnish-accept-language VCL module, which should be considered deprecated.

What is this again?

This is a software module (vmod) you use together with the Varnish HTTP reverse proxy, when your website is localized in different languages, and you want to be able to cache objects according to the language.

WARNING: this module consists of C code. Your Varnish might explode. YMMV. Don't use it in production if you don't know what you're doing. We and many other people are using it in production, but we don't know what we're doing :).

Why would you want this?

Let's say your website supports English and Japanese languages.

Your client browsers will send every possible Accept-Language header on Earth. If you enable "Vary: Accept-Language" on Varnish or on your backends, the cache hit ratio will rapidly drop, because of the huge variations in Accept-Language string contents.

With this vmod, you can rewrite the Accept-Language header to just "en" or "ja", depending on your client settings. If no good match occurs, for example if your clients are asking for a language that is not English nor Japanese, you can still select a default language for your website.

If you choose to to rewrite the original Accept-Language header, this language normalization will be completely transparent to your backend.

Read more here: http://github.com/cosimo/libvmod-i18n

Status: 
Used in production
Licence: 
Varnish version supported: 
Commercial support: 
No