<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Serenity &#187; 浏览器语言</title>
	<atom:link href="http://seanchenxi.com/tag/language-of-ie/feed" rel="self" type="application/rss+xml" />
	<link>http://seanchenxi.com</link>
	<description>-非淡泊无以明志，非宁静无以致远</description>
	<lastBuildDate>Wed, 16 Dec 2009 22:15:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>让博客识别浏览器语言，从而显示不同语言日志！</title>
		<link>http://seanchenxi.com/recognise-language-to-list-different-posts.html</link>
		<comments>http://seanchenxi.com/recognise-language-to-list-different-posts.html#comments</comments>
		<pubDate>Sat, 12 Jan 2008 19:00:38 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[浏览器语言]]></category>

		<guid isPermaLink="false">http://seanchenxi.com/recognise-language-to-list-different-posts/</guid>
		<description><![CDATA[我因为人在法国，所以写日志时常要用3种语言交替： 中文是为了和大家共享一下我在法国的留学生活啦，还有就是以我的外文水平写不出来的东西&#8230; 英文是为了写博客赚钱啦，顺便能提高一下英语水平，学金融这是必备工具啊； 法文啊，这是我在这边的生活工具嘛&#8230; 好了，废话不多说，以下的code是我刚刚学来的，还没有深入研究: 进入你wordpress管理界面，然后进入主题编辑器，打开主页面模板，在 &#60;?php if (have_posts()) &#62; 和 &#60;?php while (have_posts()) : the_post();:?&#62; 之间插入如下代码： &#60;?php if ($_SERVER["HTTP_ACCEPT_LANGUAGE"]="zh-cn") &#62; --识别浏览器的语言是否为 zh-cn &#60;?php else &#62; &#60;?php if (is_home()) {query_posts('category_name=en');}?&#62; --若不是 zh-cn, 在首页只显示" en "种类的日志 &#60;?php endif ;?&#62; 如果你不知道其他语言的代码是什么，进入IE的internet选项，在常规标签的最下方有一个语言按钮，单击它会打开一个新的小窗口，让你进行语言首选项的设置，你会看到有一个添加(A)&#8230;的按钮，点击它就能在新打开的小窗口中看到所有语言以及其代码。 希望这些能帮到你!!]]></description>
			<content:encoded><![CDATA[<p>我因为人在法国，所以写日志时常要用3种语言交替：<br />
<strong>中文</strong>是为了和大家共享一下我在法国的留学生活啦，还有就是以我的外文水平写不出来的东西&#8230;<br />
<strong>英文</strong>是为了写博客赚钱啦，顺便能提高一下英语水平，学金融这是必备工具啊；<br />
<strong>法文</strong>啊，这是我在这边的生活工具嘛&#8230;<br />
好了，废话不多说，以下的code是我刚刚学来的，还没有深入研究:<br />
进入你wordpress管理界面，然后进入主题编辑器，打开主页面模板，在<br />
<code>&lt;?php if (have_posts()) <img src='http://seanchenxi.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> &gt;</code><br />
和<br />
<code>&lt;?php while (have_posts()) : the_post();:?&gt;</code><br />
之间插入如下代码：<br />
<code><br />
&lt;?php if ($_SERVER["HTTP_ACCEPT_LANGUAGE"]="zh-cn") <img src='http://seanchenxi.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> &gt; --识别浏览器的语言是否为 zh-cn<br />
&lt;?php else <img src='http://seanchenxi.com/wp-includes/images/smilies/icon_confused.gif' alt=':?' class='wp-smiley' /> &gt;<br />
&lt;?php if (is_home()) {query_posts('category_name=en');}?&gt; --若不是 zh-cn, 在首页只显示" en "种类的日志<br />
&lt;?php endif ;?&gt;<br />
</code></p>
<p>如果你不知道其他语言的代码是什么，进入<strong>IE</strong>的<strong>internet选项</strong>，在常规标签的最下方有一个<strong>语言</strong>按钮，单击它会打开一个新的小窗口，让你进行<strong>语言首选项</strong>的设置，你会看到有一个<strong>添加(A)&#8230;</strong>的按钮，点击它就能在新打开的小窗口中看到所有语言以及其代码。</p>
<p>希望这些能帮到你!!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanchenxi.com/recognise-language-to-list-different-posts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

