one strange thing just came up, while testing, i switched positions of locales inside i18n: { locales } array. Previously they were like this ["cs", "en"]. Because of the switch in the positions to ["en", "cs"], I had to set default_locale in the config as I wanted to have the cs value as default, it looks like everything works as expected, however, when I save (publish) the file, both of the files have the values from en locale.
On this video, notice how the "cs" locale title "Title but in Czech locale" gets replaced by it's English version, but not only the Title, all of the fileds are saved from the English version
The file gets saved with the "cs" title as slug in both folders:
However the metadata for both files are the same. When I switch the locales back, that is ["cs", "en"] everything works as expected.
I guess this is because the first position in the locales array dictates the default locale, and somehow the config parameter default_locale is missed in some cases.
Hello,
one strange thing just came up, while testing, i switched positions of locales inside
i18n: { locales }
array. Previously they were like this["cs", "en"]
. Because of the switch in the positions to["en", "cs"]
, I had to setdefault_locale
in the config as I wanted to have thecs
value as default, it looks like everything works as expected, however, when I save (publish) the file, both of the files have the values fromen
locale.My current config:
On this video, notice how the "cs" locale title "Title but in Czech locale" gets replaced by it's English version, but not only the Title, all of the fileds are saved from the English version
https://github.com/StaticJsCMS/static-cms/assets/6968534/862da248-3bc6-48d0-92cd-de48342d53fc
The file gets saved with the "cs" title as slug in both folders:
However the metadata for both files are the same. When I switch the locales back, that is
["cs", "en"]
everything works as expected.I guess this is because the first position in the
locales
array dictates the default locale, and somehow the config parameterdefault_locale
is missed in some cases.This is on version 4.0.0.