Hi,
love the i18n feature of the CMS. But having some issue with creating slugs honoring the i18n part. Please see my config:
i18n:
structure: multiple_folders
locales: [ de, en]
collections:
- name: "blog"
label: "Blog"
folder: "src/pages/blog"
create: true
slug: "{{title}}"
path: '{{year}}-{{month}}-{{day}}/{{title}}/index'
i18n: true
fields:
- {label: "Title", name: "title", i18n: true, widget: "string"}
...
So the main problem is, that {{title}} is always the title of my first language (here “de”). When querying graphql my slug also contains just the german version of the title. Same with the path of course.
So this leaves me with a blog entry URL which is not localized in my gatsby setup (apart from the “/en” in the middle of the URL, but not the final parts with the title).
Do i miss something in the configuration? I translated the title of course in the authoring UI. See also my GraphQL Query result:
{
"data": {
"allMarkdownRemark": {
"nodes": [
{
"id": "f7ef10a5-e0ce-563e-b555-ee08137ba1c4",
"excerpt": "Alles in deutsch",
"fields": {
"slug": "/blog/de/2020-12-29/alles-in-deutsch/"
},
"frontmatter": {
"title": "Alles in deutsch"
}
},
{
"id": "dc521efb-ca95-5f6a-bf12-1a403e43d22c",
"excerpt": "All in Englisch",
"fields": {
"slug": "/blog/en/2020-12-29/alles-in-deutsch/"
},
"frontmatter": {
"title": "All in Englisch"
}
},
....
}