Localise error pages?

Pekka.Panula at sofor.fi Pekka.Panula at sofor.fi
Fri Apr 8 13:28:41 MSD 2011


Hi

I'm running nginx v0.7.x series, is that tip possible on older versions, 
like in nginx 0.8.x?
I am just thinking about to update to 0.8.x version.

Terveisin/Regards,
   Pekka Panula, Sofor Oy - Jatkuvat palvelut



Igor Sysoev <igor at sysoev.ru> wrote on 07.04.2011 15:25:29:

> From: Igor Sysoev <igor at sysoev.ru>
> To: nginx at nginx.org
> Date: 07.04.2011 15:25
> Subject: Re: Localise error pages?
> 
> On Thu, Apr 07, 2011 at 01:56:42PM +0300, Pekka.Panula at sofor.fi wrote:
> > Hi
> > 
> > Is there any way to localise nginx to give its error pages in 
different 
> > language? 
> > I think brower tells in headers what languages it supports, can it 
somehow 
> > to use to give localised version of error messages?
> 
> In 0.9.6+ you can try
> 
> http {
> 
>     map  $http_accept_language  $lang {
>          default                en;
>          ~^(?<LNG>fr|fi|zh|ru)  $LNG;
>     }
> 
>     server {
>         error_page  404  /errors/404.html;
> 
>         location /errors/ {
>             root   /path/to/pages/$lang/;
>         }
> 
>         ...
>     }
> 
> 
> -- 
> Igor Sysoev
> http://sysoev.ru/en/
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110408/5e5a4fd3/attachment.html>


More information about the nginx mailing list