Open spanezz opened 4 years ago
Lektor's documentation for multilingual support is here.
From what I have seen as a quick glance:
it
alternative website would be built in $OUTPUT/it/*
primary
and it won't go into a subdirectory but in the root of the output dir as usualContent-wise, in lektor one needs to manually provide one copy of each page per language, and I haven't seen any support for potfile and the like.
I'd like, if possible, at least some content negotiation, then keep one file per page, and use potfiles to help with translations.
Hugo has a few more multilingual features, including supporting different SITE_URL
per language
Ideas for multilanguage support, based on a conversation with @DonKult.
po4a
The text type (Locale::Po4a::Text) has partial markdown support. The support isn't perfect, but was good enough so far to translate a bunch of paragraphs more or less easily.
Maybe it's enough to play with multilanguage staticsite prototypes, and see where they'd lead.
Example invocations:
Serving translated versions
Currently, only explicit interlinking of pages across different languages has been tested.
This bit in an html header would look nice, but it doesn't seem like mainstream browsers currently make use of that:
It's worth looking how lektor does it, since it claim multilingual support.
For convenience, two links to doing language content negotiation with apache and nginx:
Setting current locale
Generating site pages for one language would also require a
setlocale
call to generate things like dates correctly. See #22