static-cms icon indicating copy to clipboard operation
static-cms copied to clipboard

Alternative `multiple_folders` option for i18n `structure`

Open KaneFreeman opened this issue 1 year ago • 2 comments

In the general i18n support configuration, 3 options are offered for the structure:

Required and can be one of multiple_folders, multiple_files or single_file multiple_folders - persists files in <folder>/<locale>/<slug>.<extension> multiple_files - persists files in <folder>/<slug>.<locale>.<extension> single_file - persists a single file in <folder>/<slug>.<extension>

An alternative multiple_folders (maybe single_folder) that persists files in <locale>/<folder>/<slug>.<extension> would be great.

Originally posted by @lorensansol in https://github.com/StaticJsCMS/static-cms/discussions/969

KaneFreeman avatar Nov 07 '23 17:11 KaneFreeman

Is there any way to use this directory structure?

src/
  en/
    guide/
      some-article.md
  ru/
    guide/
      some-article.md

I need to show in the i18n collection only items which are included into folder guide/ of all the languages.

bozonx avatar Jul 05 '24 13:07 bozonx

I think the way Sveltia CMS does it is ideal for multiple_folders: https://github.com/sveltia/sveltia-cms?tab=readme-ov-file#better-i18n-support

seocomosea avatar Jul 05 '24 14:07 seocomosea