We have a multilingual website project that uses translation by directory and site content mounts. This allows to have “complete” languages sites, taking the default site content as fallback:
#config/_default/module.yaml
mounts:
- source: content/zh
target: content
sites:
matrix:
languages:
- zh
- source: content/en
target: content
sites:
matrix:
languages:
- "*"
This works well, as users do not “traverse” site boundaries anymore (i.e. one navigates the Chinese website, and gets English content as fallback if Chinese is missing, while always staying on the Chinese site, so theme and other links are presented in Chinese if available).
Regarding translations management, we set a threshold of translated content needed before enabling newly added languages. But even with some guidelines, for many languages, the English fallback takes a large portion of the cake.
So the question is more about performance:
on such heavy website projects (say a few thousand pages, a few dozen languages, and maybe even a second dimensions like versions), how to optimize when most of the content comes from the same sources (i.e. English content is used at >90% for other language sites)?
Some rough stats on an old laptop (still faster than GitHub CI
)
| EN | other langs | |
|---|---|---|
| Pages | 500 | 500 |
| Paginator pages | 100 | 100 |
| Non-page files | 500 | 0 |
| Static files | 10 | 10 |
| Processed images | 1000 | 0 |
| Aliases | 100 | 100 |
| Cleaned | 0 | 0 |
| Number of langs | Time ms |
|---|---|
| 1 (only English) | 1507 |
| 2 | 2508 |
| 5 | 5540 |
| 10 | 15327 |
| 20 | 25362 |
Where are possible improvements the most useful? Config, optimisation of theme, content structure? Any tips and tricks?
TIA!