1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
|
<!DOCTYPE html>
<html lang="en-us">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Home · Polyglot">
<meta name="description" content="一款为 Jekyll 提供 i18n 多语言功能的插件,方便快捷,适用于各类大小博客">
<meta name="keywords" content="多语言, i18n, 杰基尔, 多语种, 快速, 直观, untra, 깃허브, 页面, 博客, 插件, 卢比, gem, 国际化, 本地化, 翻译, 语言, 支持, 多语言, 多语言">
<meta http-equiv="Content-Language" content="zh-CN">
<link rel="alternate" hreflang="en" href="https://polyglot.untra.io/"/>
<link rel="alternate" hreflang="es" href="https://polyglot.untra.io/es/"/>
<link rel="alternate" hreflang="de" href="https://polyglot.untra.io/de/"/>
<link rel="alternate" hreflang="fr" href="https://polyglot.untra.io/fr/"/>
<link rel="alternate" hreflang="ru" href="https://polyglot.untra.io/ru/"/>
<link rel="alternate" hreflang="nl" href="https://polyglot.untra.io/nl/"/>
<link rel="alternate" hreflang="he" href="https://polyglot.untra.io/he/"/>
<link rel="alternate" hreflang="ko" href="https://polyglot.untra.io/ko/"/>
<link rel="alternate" hreflang="zh-CN" href="https://polyglot.untra.io/zh-CN/"/>
<link rel="alternate" hreflang="pt-BR" href="https://polyglot.untra.io/pt-BR/"/>
<title>
Polyglot · Straightforward I18n for Jekyll Blogs
</title>
<!-- CSS -->
<link rel="stylesheet" href="/public/css/poole.css">
<link rel="stylesheet" href="/public/css/syntax.css">
<link rel="stylesheet" href="/public/css/hyde.css">
<link rel="stylesheet" href="/public/css/custom.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/public/favicon.ico">
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/zh-CN/atom.xml">
</head>
<body theme-base-08>
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<p class="speech">你好!</p>
</br>
<h1>
<a href="">
Polyglot
</a>
</h1>
<p class="lead">一款为 <a href="http://jekyllrb.com" target="_blank">Jekyll</a> 提供 i18n 多语言功能的插件,方便快捷,适用于各类大小博客。<a href="https://github.com/untra" target="_blank">@untra</a> 出品。</p>
</div>
<nav class="sidebar-nav">
<a class="sidebar-nav-item" href="/zh-CN/">Home</a>
<a class="sidebar-nav-item" href="/zh-CN/about/">About</a>
<a class="sidebar-nav-item" href="/zh-CN/yi-tiao-chao-chang-de-yong-jiu-lian-jie/permalink/">一条超长的永久链接</a>
<a class="sidebar-nav-item" href="/zh-CN/sample/">Sample rich text data</a>
<a class="sidebar-nav-item" href="/zh-CN/seo/">SEO 方案</a>
<a class="sidebar-nav-item" href=""></a>
<a class="sidebar-nav-item" href="https://rubygems.org/gems/jekyll-polyglot">Ruby Gem</a>
<a class="sidebar-nav-item" href="https://github.com/untra/polyglot">GitHub project</a>
<a class="sidebar-nav-item" href="https://github.com/untra/polyglot/tree/master/site/index.html"><small>view this page source on github</small></a>
<small class="sidebar-nav-item">Currently v1.9.0</small>
</nav>
<p><small>© 2025 Samuel Volin</small><br/><small>MIT Licensed</small></p>
<p>
<!-- jekyll-polyglot will process ferh= into href= through the static_href liquid block tag without relativizing the url; useful for making language navigation switchers -->
<a href="/page3/" >en</a> •
<a href="/es/page3/" >es</a> •
<a href="/de/page3/" >de</a> •
<a href="/fr/page3/" >fr</a> •
<a href="/ru/page3/" >ru</a> •
<a href="/nl/page3/" >nl</a> •
<a href="/he/page3/" >he</a> •
<a href="/ko/page3/" >ko</a> •
<a style="font-weight: bold;" href="/zh-CN/page3/" >zh-CN</a> •
<a href="/pt-BR/page3/" >pt-BR</a>
</p>
</div>
</div>
<div class="content container">
<div class="posts">
<div class="post">
<h1 class="post-title">
<a href="/zh-CN/2021/04/18/polyglot-1.4.1/">
Polyglot 1.4.1
</a>
</h1>
<span class="post-date">18 Apr 2021</span>
<p>Polyglot <a href="https://rubygems.org/gems/jekyll-polyglot/versions/1.4.1">1.4.1 版本</a>的额外补丁版本已推出!</p>
<h2 id="对-i18n_headers-的小修复">对 i18n_headers 的小修复</h2>
<p>Cleanup 时所需的应变功能导致需要进行一些小修复和测试。</p>
<h2 id="向我们讲俄语朋友们说声-привет">向我们讲俄语朋友们说声 Привет</h2>
<p>网站现已添加俄语支持!</p>
<h2 id="想要看到你的语言的特性吗">想要看到你的语言的特性吗?</h2>
<p>我在募集志愿者,为你的语言提供 <a href="https://polyglot.untra.io/zh-CN/">Jekyll-Polyglot 项目网站主页</a>的多语言支持!如果你觉得这款软件十分有用,且希望以你的语言呈现,请在 <a href="https://github.com/untra/polyglot/issues">github issues</a> 页面联系我。</p>
</div>
<div class="post">
<h1 class="post-title">
<a href="/zh-CN/2021/02/07/polyglot-1.4.0/">
Polyglot 1.4.0
</a>
</h1>
<span class="post-date">07 Feb 2021</span>
<p>Polyglot <a href="https://rubygems.org/gems/jekyll-polyglot/versions/1.4.0">1.4.0 版本</a>现已推出!</p>
<figure class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">gem install jekyll-polyglot</span></code></pre></figure>
<h2 id="href-属性的静态去相对化"><code class="language-plaintext highlighter-rouge">href</code> 属性的静态去相对化</h2>
<p>本版本新增了一个 Liquid 块标签 ` {% static_href %}href=”…”{% endstatic_href %} `。该块标签可用于创建不受 Polyglot 相对化影响的锚点标签中的href属性。</p>
<p>Jekyll-Polyglot 在相对化处理上有些生硬,所以如果你想要制作一些明确的静态 URL 内容(比如<a href="https://github.com/untra/polyglot/blob/master/site/_includes/sidebar.html#L40-L42">制作一个语言切换器</a>)该 Liquid 标签可以帮助你构建那些不会被扭曲的 <code class="language-plaintext highlighter-rouge">href="..."</code> 标签。</p>
<h2 id="独占式网站语言生成">独占式网站语言生成</h2>
<p>Polyglot 1.4.0 添加了对 <code class="language-plaintext highlighter-rouge">lang-exclusive: [ ]</code> 头文件字段的支持。如果对文档添加该头文件字段,将会限制 Jekyll 仅对指明的语言的子站点生成该文档。</p>
<figure class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="nn">---</span>
<span class="na">lang-exclusive</span><span class="pi">:</span> <span class="pi">[</span><span class="s1">'</span><span class="s">zh-CN'</span><span class="pi">]</span>
<span class="nn">---</span></code></pre></figure>
<p>这是一种控制哪些语言可以查看该文档的方法,即使该文档在默认语言站点中可能没有相对应的版本。</p>
<h2 id="重命名部分-liquid-标签">重命名部分 Liquid 标签</h2>
<p>` {% static_href %} ` 标签现在也可以使用 ` {% Static_Href %} ` 。现存的 ` {% I18n_Headers %} ` 标签也可以用 ` {% i18n_headers %} ` 来使用。</p>
<h2 id="想要看到你的语言吗">想要看到你的语言吗?</h2>
<p>我在募集愿意为 <a href="https://polyglot.untra.io/zh-CN/">Jekyll-Polyglot 主页</a> 提供属于您的母语版本的志愿者!如果您觉得本软件对您有用,且希望本官方站点以您的语言呈现,请在 <a href="https://github.com/untra/polyglot/issues">GitHub issues</a>上联系我。</p>
</div>
<div class="post">
<h1 class="post-title">
<a href="/zh-CN/2020/07/19/polyglot-1.3.3/">
Polyglot 1.3.3
</a>
</h1>
<span class="post-date">19 Jul 2020</span>
<p>Polyglot <a href="https://rubygems.org/gems/jekyll-polyglot/versions/1.3.3">1.3.3 版本</a>推出!该版本修复了一个在<a href="https://github.com/untra/polyglot/issues/89">全新构建</a> 包含 Polyglot 的项目的情况下,运行 <code class="language-plaintext highlighter-rouge">jekyll serve --incremental</code> 命令时发生的小问题。</p>
<figure class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">gem install jekyll-polyglot</span></code></pre></figure>
<p>本次发布得益于以下GitHub用户的支持!</p>
<ul>
<li><a href="https://github.com/alexanderadam">alexanderadam</a></li>
</ul>
</div>
<div class="post">
<h1 class="post-title">
<a href="/zh-CN/2020/04/29/polyglot-1.3.2/">
Polyglot 1.3.2
</a>
</h1>
<span class="post-date">29 Apr 2020</span>
<p>Polyglot <a href="https://rubygems.org/gems/jekyll-polyglot/versions/1.3.1">1.3.2 版本</a> 现已推出!去试试吧!</p>
<figure class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">gem install jekyll-polyglot</span></code></pre></figure>
<p>本次发布得益于以下 GitHub 用户的支持:</p>
<ul>
<li><a href="https://github.com/eighthave">eighthave</a></li>
</ul>
<h3 id="lang_from_path-设置-setting-to-derive-document-lang-from-relative-path"><code class="language-plaintext highlighter-rouge">lang_from_path</code> 设置 setting to derive document lang from relative path</h3>
<p>This release adds a new boolean configuration setting <code class="language-plaintext highlighter-rouge">lang_from_path</code>. When set to true, this option tells polyglot to derive the base language from a matching subpath if the lang frontmatter is not set. This setting works well in conjunction with other translation maintenance tools such as <a href="https://po4a.org/">po4a</a>.</p>
<h3 id="相对和绝对-url-的相对化逻辑优化">相对和绝对 url 的相对化逻辑优化</h3>
<p><code class="language-plaintext highlighter-rouge">excluded_from_localization</code> files will have trailing slashes added to their paths if they are directories. In addition, these files will be matched differently in the relativize and absolute url regex matchers. This will improve the accuracy of url relativization based on user feedback.</p>
</div>
<div class="post">
<h1 class="post-title">
<a href="/zh-CN/2017/07/23/Polyglot-1.3.0/">
Polyglot 1.3.0
</a>
</h1>
<span class="post-date">23 Jul 2017</span>
<p>Polyglot 的全新版本现已推出。去试试吧!</p>
<figure class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">gem install jekyll-polyglot</span></code></pre></figure>
<p>本次发布得益于以下 GitHub 用户的支持:</p>
<ul>
<li><a href="https://github.com/vlsi">vlsi</a></li>
<li><a href="https://github.com/pserwylo">pserwylo</a></li>
</ul>
<h3 id="递归式合并不同语言特定的-sitedata">递归式合并不同语言特定的 <code class="language-plaintext highlighter-rouge">site.data</code></h3>
<p>现在,在你的 <code class="language-plaintext highlighter-rouge">site.data</code> 目录下的特定语言内容将会递归地被合并在一起。也就是说,<code class="language-plaintext highlighter-rouge">active_lang</code> 的内容会优先于 <code class="language-plaintext highlighter-rouge">default_lang</code> 的内容呈现,也就是优先于非特定语言的内容。(<a href="https://github.com/untra/polyglot/pull/59">#59</a>)</p>
<h3 id="未指定语言的文件仍然会被写入-default_lang-的站点根目录">未指定语言的文件仍然会被写入 <code class="language-plaintext highlighter-rouge">default_lang</code> 的站点根目录</h3>
<p>如果没有在 <code class="language-plaintext highlighter-rouge">languages</code> 中定义 <code class="language-plaintext highlighter-rouge">default_lang</code>,本功能会确保没有指定语言的文件(也就是被排除在本地化之外的文件)仍然会被写入站点根目录。(<a href="https://github.com/untra/polyglot/pull/65">#65</a>)</p>
<h3 id="i18n_headers-性能提升以及修复"><code class="language-plaintext highlighter-rouge">i18n_headers</code> 性能提升以及修复</h3>
<p>现在,文档处理速度更快了。此外,修复了 <code class="language-plaintext highlighter-rouge">site.url</code> 被定义时的 <code class="language-plaintext highlighter-rouge">i18n_headers</code> 处理。(<a href="https://github.com/untra/polyglot/pull/67">#67</a>)</p>
<h3 id="自定义站点配置文件中的-active_lang-键">自定义站点配置文件中的 <code class="language-plaintext highlighter-rouge">active_lang</code> 键</h3>
<p>这将允许 <code class="language-plaintext highlighter-rouge">active_lang</code> 使用自定义的键,使 Polyglot 可以和其他的插件与主题更好地配合使用。(<a href="https://github.com/untra/polyglot/pull/68">#68</a>)</p>
</div>
</div>
<div class="pagination">
<a class="pagination-item older" href="/zh-CN/page4">Older</a>
<a class="pagination-item newer" href="/zh-CN/page2">Newer</a>
</div>
</div>
</body>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HWC3D32MT8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-HWC3D32MT8');
</script>
</html>
|