You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using eleventy to build a multlingual site for a community farm that I am part of.
The site is supposed to feature pages in english, french and dutch.
I will not write content for the site, but just set up the basic structure, so other people will only have to add md.files in the right folders and edit data files.
The site uses URLs such as /en/path, /fr/path, /nl/path which are supposed to lead to the same entry translated to the specified language.
I would like to ensure that if somebody created /nl/path, there will also be pages /fr/path and /en/path informing the visitor that the page hasn't been translated yet, and a link to the version already translated.
In theory this should be easy with pagination, the only problem is that I need to get an array beforehand with all the pages not translated yet + the information in which language it is available.
I tried to use the before option given by pagination, to transform collections.all into the array I need. But then I have to write the frontmatter as a javascript front matter, and apparently in a javascript enviroment I do not have access to collections anymore. Propably it is possible to use the collectionsApi, but with the available documentation, I was not able to make it work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I am using eleventy to build a multlingual site for a community farm that I am part of.
The site is supposed to feature pages in english, french and dutch.
I will not write content for the site, but just set up the basic structure, so other people will only have to add md.files in the right folders and edit data files.
The site uses URLs such as
/en/path
,/fr/path
,/nl/path
which are supposed to lead to the same entry translated to the specified language.I would like to ensure that if somebody created
/nl/path
, there will also be pages/fr/path
and/en/path
informing the visitor that the page hasn't been translated yet, and a link to the version already translated.In theory this should be easy with pagination, the only problem is that I need to get an array beforehand with all the pages not translated yet + the information in which language it is available.
I tried to use the before option given by pagination, to transform
collections.all
into the array I need. But then I have to write the frontmatter as a javascript front matter, and apparently in a javascript enviroment I do not have access to collections anymore. Propably it is possible to use the collectionsApi, but with the available documentation, I was not able to make it work.Beta Was this translation helpful? Give feedback.
All reactions