DEV Community


Posted on

How to set the language of a post?

Hello πŸ‘‹,

I see in the preference that there is a Languages option, and my blog uses French and English so almost all my post are in this two languages (two separated posts, not both language on the same posts).

I am wondering how does that work with post I make federate on, should I add a language tag or a specific declaration in the front matter? The documentation does not says any thing about the language (yet?).

Top comments (5)

antogarand profile image
Antony Garand

I think you need to add it as a tag, so #japanese will consider the post to be non-english

mayeu profile image

From the source it seems that the language is also autodetected.

I may start to post my post with the #french tag then.

But it would be nice to have more info about this from the dev team :)

mayeu profile image

Ha, I just found this issue:

Ability to mark a post's written language #224

leomeloxp avatar
leomeloxp commented on May 31, 2018


I've seen you have options for languages to see in my feed, how can I define that my post is written in a given language? seems to have a good (hopefully increasing) number of Portuguese readers but I have no idea on how I could look for articles written in Portuguese myself.

Request or User Story

It would be really useful if we had the ability to indicate that our posts are written in a given language and then the ability to filter posts by their language.

For the writer: When creating a new post, to have the ability to pick a language or locale in which my post will be written in, eg Portuguese, PT_Br, πŸ‡§πŸ‡· / πŸ‡΅πŸ‡Ή.

For the reader: Ability to filter posts by a given language, using tags or similar feature, or make use of the language checkbox in the Misc Settings area.

Definition of Done

For the writter: See the ability to indicate the language of my post by using frontmatter or similar.

For the reader: Ability to filter posts by language or set preference to which languages to see on my feed first.


My main reason for requesting this feature is that I think there's tons of excellent content on in English already, but for other languages (that I speak) maybe not so much and I would love to be able to provide some of that content but it would be much better if I could highlight the fact that the post is aimed at speakers of a given language (for both the writer and the reader).

And it seems that there is only auto detection right now :)

I subscribed to it to see the evolution of that!

ben profile image
Ben Halpern

Yes, language is auto-detected, but there have been some logical issues. Basically we have made some modifications to the feed which have broken some of the behaviors. It has been hard to tune this properly, but we will get this worked out at some point.

In the meantime, yes, tags can be used. #japanese is currently used. Sorry about the problems.

Thread Thread
mayeu profile image

Hey Ben,

Thank you for dropping in :) No problems, I just wanted to avoid doing something dumb and clutter the feed of non interested people!πŸ˜…

I'll use tags for now to denote my french posts πŸ™