I’m building a site in multiple languages. I translated the directory structure for each language and link both the list and single pages with translationkeys. This works fine for generating the href lang & linking the pages to their counterparts in other languages.
However, the page bundles are not inherited from the primary language - they are only inherited if the folders above are identical.
Am I doing something wrong or is the inheritance only working when directory structure is identical for all translations?
No one able to explain this?
According to the docs translationkey can be used to link pages as translated content
On the same page it says that “each Page Bundle inherits the resources of its linked translated pages’ bundles except for the content files (markdown files, html files etc…).”
This last part seems not correct when linking translated pages using the translationkey. It works for generating cross-links to the other language versions (indicating that the language versions are properly linked) but the page bundles are not found. I can off course duplicate all the images on each of the translations but it just not really efficient.
Yes. The files/directories are currently merged on the file system level – before we look at the content. This is, in your case, unfortunate. I guess it’s fixable, but it’s not a trivial task.
Thanks @bep for your reply!
I tried to build a fix my self by searching in translations for the original file and use that for processing - but didn’t work as the Permalink refers to the original url and not the translated one.
Will work on a solution outside Hugo to copy the images to the translated folders.
On a side note: thanks for creating Hugo - almost finished the tech part of my site and amazed by the flexibility
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.