avitorio / outstatic

Outstatic - A static CMS for Next.js

Home Page:https://Outstatic.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Localization support

DCzajkowski opened this issue · comments

What do you think about adding localization support? This would allow creating and editing collection items in multiple languages.

Assumptions

Setup

  1. Add a new environment variable:
OST_LOCALES=en,pl # Specify supported locales with a comma-separated list. If empty, localization is not supported.
  1. Add a locale to the file name between the slug and extension:
outstatic/
  content/
    posts/
      post-1.en.md
      post-1.pl.md
      post-2.en.md
      post-2.pl.md

Changes in the UI

  1. Add a language switcher in the collection list. This would allow to preview the list with titles in specific locale.

  2. Add a side-by-side editor, or a locale switcher in the editor, to allow editing in multiple languages. Notify before saving if one of the locales has no content.

PR

I can work on a PR and should have something ready by the end of the week. However, I would like to know if you are willing to add support for this, and are my assumptions correct.

Ah, closing in favor of #28