How-To internationalize the table of contents Every book(course) that is used in ActiveMath is defined by a so-called RecBook file. Normally we have exactly one such file per book. Here is a shortened example.
<omdoc>

<omgroup id="theRecbook"> <metadata> <Title xml:lang="en">My First Course</Title> </metadata>

<omgroup> <metadata> <Title xml:lang="en">Page 1</Title> <Contributor>John Doe</Contributor> </metadata> <ref xref="my_first_theory/an_axiom" /> <ref xref="my_first_theory/exercise_1" /> <ref xref="my_first_theory/exercise_2" /> </omgroup>

</omgroup> </omdoc>

The above code will lead to a table of contents as this:

The first Title metadata entry specifies the name of the book, the second specifies the name of the first page. If we wanted for example to add German translations all we need to do is add a line similar to

<Title xml:lang="de">_the_german_title_</Title>
in the metadata part for every title we want to change.

Here is the complete modified code example, which delivers German titles if a user who chose German as his language logs in:

<omdoc>

<omgroup id="theRecbook"> <metadata> <Title xml:lang="en">My First Course</Title> <Title xml:lang="de">Mein erster Kurs</Title> </metadata>

<omgroup> <metadata> <Title xml:lang="en">Page 1</Title> <Title xml:lang="de">Seite 1</Title> <Contributor>John Doe</Contributor> </metadata> <ref xref="my_first_theory/an_axiom" /> <ref xref="my_first_theory/exercise_1" /> <ref xref="my_first_theory/exercise_2" /> </omgroup>

</omgroup> </omdoc>

Remark: In case you are not happy with some titles the recbook also is the place to correct them according to your wishes.

The above code will lead to a table of contents like this:



Last edited by Michael at Oct 6, 2008 11:38 AM - Edit content - View source