1.1 --- a/docs/internationalisation.html Mon Jan 30 22:13:49 2006 +0000
1.2 +++ b/docs/internationalisation.html Mon Jan 30 22:14:06 2006 +0000
1.3 @@ -50,7 +50,7 @@
1.4 features, we must first obtain a reference to the above document:</p><pre># In the respond_to_form method of an XSLFormsResource...<br />translations_xml = self.prepare_document("translations")</pre><p>Then,
1.5 we must decide which language or locale the output will employ. One way
1.6 of making that decision is to use the WebStack API to find out which
1.7 -languages a user's Web browser is configured to receive:</p><pre># In the respond_to_form method of an XSLFormsResource...<br />languages = trans.get_content_languages()<br /># Get the first one...<br />language = languages[0]</pre><p>Finally,
1.8 +languages a user's Web browser is configured to receive:</p><pre># In the respond_to_form method of an XSLFormsResource...<br />languages = trans.get_content_languages()<br /># Get the first one...<br />try:<br /> language = languages[0]<br />except IndexError:<br /> language = "" # Or choose an acceptable default.</pre><p>Finally,
1.9 with the above information in hand, we may now modify the output
1.10 production by adding a document reference (thus permitting the output
1.11 stylesheet to access the translations document) and by specifying the