# HG changeset patch # User paulb # Date 1133460400 0 # Node ID bfc995c3c23201e2ce353fb327480ee24563ab1b # Parent 973c26834cd9dc8da1cf692822e362116eb1bd4e [project @ 2005-12-01 18:06:30 by paulb] Introduced internationalised output. diff -r 973c26834cd9 -r bfc995c3c232 examples/Common/Configurator/Resources/config_template.xhtml --- a/examples/Common/Configurator/Resources/config_template.xhtml Thu Dec 01 18:06:13 2005 +0000 +++ b/examples/Common/Configurator/Resources/config_template.xhtml Thu Dec 01 18:06:40 2005 +0000 @@ -4,7 +4,7 @@ - System Configurator + System Configurator @@ -12,14 +12,14 @@ -

System Configurator

+

System Configurator

-

Base System

+

Base System

-

Model +

Model @@ -45,7 +45,7 @@

-

Memory

+

Memory

Memory unit @@ -53,53 +53,53 @@ - +

- +

diff -r 973c26834cd9 -r bfc995c3c232 examples/Common/Configurator/Resources/translations.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Common/Configurator/Resources/translations.xml Thu Dec 01 18:06:40 2005 +0000 @@ -0,0 +1,36 @@ + + + + + + + + + + Systemkonfigurasjon + Kabinett + Modell + Prosessor + CPU + Minne + Minneenhet + Harddisker + Harddisk + Lagringsenheter + Lagringsenhet + Tilleggsutstyr + Input + Tastatur + Mus + Pris + Totalpris for denne konfigurasjonen: + Output + Skjerm + Legg til minne + Legg til lagring + Legg til harddisk + Fjern + Oppdatér! + Eksportér! + + diff -r 973c26834cd9 -r bfc995c3c232 examples/Common/Configurator/__init__.py --- a/examples/Common/Configurator/__init__.py Thu Dec 01 18:06:13 2005 +0000 +++ b/examples/Common/Configurator/__init__.py Thu Dec 01 18:06:40 2005 +0000 @@ -38,7 +38,8 @@ "memory-unit" : "config_memory_unit.xml", "mouse" : "config_mouse.xml", "screen" : "config_screen.xml", - "storage-unit" : "config_storage_unit.xml" + "storage-unit" : "config_storage_unit.xml", + "translations" : "translations.xml" } in_page_resources = { "cpu" : ("config_output_cpu.xsl", "cpu-node"), @@ -123,7 +124,9 @@ # Complete the response. - self.send_output(trans, [trans_xsl], configuration, stylesheet_parameters) + stylesheet_parameters["locale"] = trans.get_content_languages()[0] + self.send_output(trans, [trans_xsl], configuration, stylesheet_parameters, + references={"translations" : self.prepare_document("translations")}) #from XSLTools import XSLOutput #import sys