PerlMonks - The Monastery Gates (original) (raw)
Esteemed Monks,
I am trying to create a multi-language website. The backend is Mojolicious::Lite with templates handled by Text::Xslate.
Here is a brief sketch of how I think I want this to be, assuming a website of just one webpage which contains just one "Hello":
- there should be a generic page where content is written in english, to contain something like: "[[%% english:Hello %%]]". This page will be used to produce all other language-specific pages, occassionally and when new content is added. This procedure should not happen every time a user accesses a page, obviously.
- There is a dictionary somewhere which translates 'Hello' from english to all the other supported languages. That's the responsibility of the website maintainer to create. I am not looking for automatic translations.
- A template engine is used to replace all "[[%% english:Hello %%]]" and produce the various other webpages living in /en/index.html, /fr/index.html, etc.
- Produced webpages may also be templated but their template tags should not be the same as the language-template tags [[%% ... %%]]. Basically something to discriminate between the two levels of templating content.
So, is there anything like this available already? Or if I am going to start from scratch, any hints/advice?
many thanks, bliako