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
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.
Lektor's documentation for multilingual support is here.
From what I have seen as a quick glance:
site-wide one configures a list of alternatives, each with its locale information
the site is built multiple times, writing the output into a directory prefixed with the alternative name. For example, the it alternative website would be built in $OUTPUT/it/*
one alternative can be configured as primary and it won't go into a subdirectory but in the root of the output dir as usual
Content-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.
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 #22The text was updated successfully, but these errors were encountered: