i18n in web pages, plus templating now works.

This commit is contained in:
david 2002-05-17 16:48:19 +00:00
parent 1f76304849
commit 2211b31b13
2 changed files with 7 additions and 5 deletions

View File

@ -34,10 +34,10 @@ class HTMLFactory:
class PageFactory:
def __call__(self, key, lang):
page = ''
page = page + L.Strings['header'].I18n[lang].Text
page = page + L.Strings[key].I18n[lang].Text
page = page + L.Strings['footer'].I18n[lang].Text
page = L.Strings['template_default'].I18n[lang].Text
page = page.replace('|header|', L.Strings['header'].I18n[lang].Text)
page = page.replace('|body|', L.Strings[key].I18n[lang].Text)
page = page.replace('|footer|', L.Strings['footer'].I18n[lang].Text)
return page

View File

@ -3,6 +3,7 @@
This document defines the architecture for the Lampadas Document Management System.
It is intended for developers working on the Lampadas System.
=Module List=
The following modules comprise the system:
@ -77,7 +78,6 @@ needs to build the pages.
Content of the pages themselves is held in the database, to support online editing of
page content by system administrators, and also to support internationalization.
*HTML
The HTML module generates HTML primitives, such as comboboxes, that are used to
@ -89,6 +89,7 @@ desired language as a two-character ISO code.
The Converter module knows how to take documents in various formats and convert them
into the Lampadas standard output format, DocBook XML.
=Module Dependencies=
<programlisting>
@ -118,6 +119,7 @@ the underlying database through an object hierarchy. Additional modules are buil
on top of the DataLayer which implement specific functionality. Each of these can
be consider an "extension" of the system, and any number of them could be constructed.
=Internationalization=
Internationalization, or i18n for short, means support for multiple languages.