洪 民憙 (Hong Minhee)<p>I've been wrestling with implementing <a class="mention hashtag" rel="nofollow noopener noreferrer" href="https://hackers.pub/tags/multilingual" target="_blank"><span class="">#</span><span class="">multilingual</span></a> content support in <a href="https://hackers.pub/" rel="nofollow noopener noreferrer" target="_blank">Hackers' Pub</a>, our <a class="mention hashtag" rel="nofollow noopener noreferrer" href="https://hackers.pub/tags/ActivityPub" target="_blank"><span class="">#</span><span class="">ActivityPub</span></a>-powered platform for software engineers.</p>
<p>While <a href="https://www.w3.org/TR/activitystreams-vocabulary/#ex131-jsonld" rel="nofollow noopener noreferrer" target="_blank">ActivityPub theoretically supports multilingual content through the <code>contentMap</code> property</a>, the reality is that most server implementations (Mastodon, Misskey, etc.) don't properly handle this content as of April 2025. This creates a significant challenge for us.</p>
<p>We want our users to share their knowledge in multiple languages, but we need to ensure compatibility with existing ActivityPub servers. I'm considering several approaches:</p>
<ol>
<li>Creating separate posts for each language with clear language indicators, linking them through <code>inReplyTo</code> relationships (so translations appear as replies to the original post)</li>
<li>Using the primary language in <code>content</code> while storing translations in <code>contentMap</code></li>
<li>Adding "View in other languages" links at the bottom of each post</li>
<li>Implementing inline language dividers that degrade gracefully on non-supporting servers, for example:<pre><code><span class=""><span><</span><span>div</span><span> lang</span><span>=</span><span>"</span><span>en</span><span>"</span><span>></span></span>
<span class=""><span> <</span><span>h3</span><span>></span><span>English</span><span></</span><span>h3</span><span>></span></span>
<span class=""><span> <</span><span>p</span><span>></span><span>This is the English content…</span><span></</span><span>p</span><span>></span></span>
<span class=""><span></</span><span>div</span><span>></span></span>
<span class=""><span><</span><span>hr</span><span>></span></span>
<span class=""><span><</span><span>div</span><span> lang</span><span>=</span><span>"</span><span>ko</span><span>"</span><span>></span></span>
<span class=""><span> <</span><span>h3</span><span>></span><span>한국어</span><span></</span><span>h3</span><span>></span></span>
<span class=""><span> <</span><span>p</span><span>></span><span>한국어 내용입니다…</span><span></</span><span>p</span><span>></span></span>
<span class=""><span></</span><span>div</span><span>></span></span></code></pre>
</li>
</ol>
<p>I'm leaning toward a hybrid approach—showing content in the user's preferred language when possible while providing easy access to other language versions.</p>
<p>Has anyone tackled this problem effectively? I'd love to hear about your experiences or ideas for making multilingual content work well in the fediverse, especially when dealing with server implementations that don't fully support ActivityPub's multilingual features.</p>
<p><a class="mention hashtag" rel="nofollow noopener noreferrer" href="https://hackers.pub/tags/fedidev" target="_blank"><span class="">#</span><span class="">fedidev</span></a> <a class="mention hashtag" rel="nofollow noopener noreferrer" href="https://hackers.pub/tags/federation" target="_blank"><span class="">#</span><span class="">federation</span></a> <a class="mention hashtag" rel="nofollow noopener noreferrer" href="https://hackers.pub/tags/i18n" target="_blank"><span class="">#</span><span class="">i18n</span></a></p>