<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.nginx.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.nginx.org/index.php?title=AcceptLanguageModule&amp;feed=atom&amp;action=history</id>
		<title>AcceptLanguageModule - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.nginx.org/index.php?title=AcceptLanguageModule&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=AcceptLanguageModule&amp;action=history"/>
		<updated>2013-05-23T01:42:14Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=AcceptLanguageModule&amp;diff=286&amp;oldid=prev</id>
		<title>Jbyers: correct Evan Miller's domain</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=AcceptLanguageModule&amp;diff=286&amp;oldid=prev"/>
				<updated>2010-11-10T23:06:49Z</updated>
		
		<summary type="html">&lt;p&gt;correct Evan Miller&amp;#039;s domain&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= nginx_accept_language_module =&lt;br /&gt;
&lt;br /&gt;
''This module is not distributed with the Nginx source. See [[#installation|the installation instructions]].''&lt;br /&gt;
&lt;br /&gt;
Available on github at [http://github.com/giom/nginx_accept_language_module/] &lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This module parses the Accept-Language header and gives the most suitable locale for the user from a list of supported locales from your website.&lt;br /&gt;
&lt;br /&gt;
== Example configuration ==&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
set_from_accept_language $lang en ja pl;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;$lang&amp;lt;/code&amp;gt; is the variable in which to store the locale and &amp;lt;code&amp;gt;en ja pl&amp;lt;/code&amp;gt; are the locales supported by your website&lt;br /&gt;
&lt;br /&gt;
If none of the locales from &amp;lt;code&amp;gt;accept_language&amp;lt;/code&amp;gt; is available on your website, it sets the variable to the first locale of your website's supported locales (in this case &amp;lt;code&amp;gt;en&amp;lt;/code&amp;gt;).&lt;br /&gt;
 &lt;br /&gt;
Note: It currently assumes that the accept-language is sorted by quality values (from my tests it's the case for safari, firefox, opera and ie) and discards q (see [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html]). In the situation where I'm using the module, this assumption works... but buyer beware :-)&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Download the module source from [http://github.com/giom/nginx_accept_language_module github].  &lt;br /&gt;
&lt;br /&gt;
Unpack, and then compile nginx with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --add-module=path/to/nginx_accept_language_module&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Why did I create it? ==&lt;br /&gt;
I'm using page caching with merb on a multi-lingual website and I needed a way to serve the correct language page from the cache&lt;br /&gt;
I'll soon put an example on http://gom-jabbar.org&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
Send Bugs to Guillaume Maury (dev@gom-jabbar.org)&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Evan Miller for his [http://evanmiller.org/nginx-modules-guide.html guide on writing nginx modules].&lt;/div&gt;</summary>
		<author><name>Jbyers</name></author>	</entry>

	</feed>