atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Internationalization / i18n / allow users to make translations for content

Open joepio opened this issue 6 months ago • 0 comments

Users who publish content in AtomicServer should be able to do so in multiple languages. This is a features that most headless CMS tools have built-in. However, it's not entirely obvious how this should work in AtomicServer

Wishes / goals

  • Users can edit textual content per language, so that AtomicServer can host localized websites.
  • Users can set locales (on a project / website scope probably)

Approaches

Add a LocalizedText datatype

Like String, we also add this new translation type. This is a JSON object containing a bunch of keys. Every key could be a locale-id (e.g. en-us).

  • Simple, clean
  • Discoverable from JSON data
  • Every request contains all locale fields, which means that there may be a lot of wasted bandwidth. Maybe this can be mitigated by making an endpoint (e.g. /localizedGet?lang=en-us) that filters the properties. Maybe search endpoint could that same feature.

Locale-dependent branches

We're also working on drafts, and local-first CRDT stuff, so branching is something that we might want to have. We could have a branch for each locale. I think that's how NextGraph works too?

  • Requires branching to be a thing (which would be a huge change in how commits work now)
  • Normal URLs would not resolve to localized data. Unclear how to solve this?

joepio avatar Jun 02 '25 08:06 joepio