惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
A
About on SuperTechFans
博客园 - Franky
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
B
Blog
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 叶小钗
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
Last Week in AI
Last Week in AI
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
V
V2EX
G
Google Developers Blog

Bear docs

Private blogs Favicons and logos Comments Roadmap Not seeing your post? Code of Conduct RSS Subscriber analytics Upgrading from subscription to lifetime Neat Bear features
Multi-language blog
hidden (docs · 2025-08-27 · via Bear docs

Bear docs

There are a few ways to set up a multi-language blog on Bear. Below are the most common methods. All of the examples will use English and French as the two languages.

This is the simplest approach. Write one blog in English, and one blog in French. You can then subdomain the blogs to represent the languages with either a custom domain (eg: fr.myblog.com) or using the Bear subdomain (eg: myblog-fr.bearblog.dev).

On the home page, in the nav, or in the footer (or anywhere else that supports content on Bear) add a link to the other language blog in the form of something like:

[Read this blog in French](https://fr.myblog.com)

This method relies on an upgraded account which can handle multiple blogs. Ensure you set the lang attribute for the blog so that it is filtered correctly in the Bear discovery feed and by search engines.

Use tag filters

This method uses one blog, but allows you to write in multiple languages. It works by tagging posts as a specific language, then using filters to correctly categorise them.

  • Set your blog lang attribute to the most used language (eg: lang: en)
  • On each post set the relevant lang attribute (eg: lang: fr).
  • On each post set a tag specifying the language of the post (eg: tags: French)

Now in your blog's Nav (or anywhere that supports content on Bear) you can specify a tag filtered blog list using the /blog/?q=French query. Eg:

[Home](/) [English posts](/blog/?q=English) [Articles français](/blog/?q=French)

This could be used in homepage content instead with something along the lines of:

Lis [mes articles en français](/blog/?q=French)

Using post list embeds

This method uses one blog, but allows you to write in multiple languages. It works by tagging posts as a specific language, then using embedded post lists to correctly categorise them.

Similarly to the previous method you'll need to categories the posts like this:

  • Set your blog lang attribute to the most used language (eg: lang: en)
  • On each post set the relevant lang attribute (eg: lang: fr).
  • On each post set a tag specifying the language of the post (eg: tags: French)

Then create a page (called something like Articles français) and in that page set the content to:

# Articles français

{{ posts|tag:French }}

You can do the same thing for English posts.

Note that this method doesn't allow filtering further by tags, since post embeds don't support tag filtering.

Final thoughts

There are a few other, more esoteric ways to handle this. I've seen some examples of using <details><summary>Read in English<summary>..., and others where people get creative with Javascript. The world is your mollusk.

Any great ideas to add to this docs page? Send me an email.