Working with Multilingual Collections
You can easily work with small multilingual collections in Tópico, which makes is easy to switch between all translated versions of a topic. The default collection that ships with Tópico is bilingual and targets English and French languages.
Adding a new language to a collection
Follow these steps to add a new language to a collection.
- Open the collection properties dialog window;
- On the General tab, add the new language to the grid in the lower right and press Enter;
- Click the Ok button to close the properties dialog.
At this point, the new language is added to the drop down list and you can switch to this language immediately. When you select a topic in the treeview and a file does not exist in the current language, the english version of the topic is loaded to be translated.
Add a language description for HTML Help outputs
You can add a new language to the configuration file if you need to publish HTML Help (CHM) outputs. The default installation of Tópico includes English, French and Spanish.
Follow these steps to add a new language for HTML Help publishing.
- From the main menu, select ;
- Scroll to the bottom of the file;
- Add your new language to the "languages" section listing.
<section id="languages"> <set key="en" value="0x409 English (United States)">English</set> <set key="es" value="0x40A Spanish (Mexico)">Español</set> <set key="fr" value="0xC0C French (Canada)">Français</set> </section>
How are multilingual topics saved?
Each topic you create in Tópico is saved as a separate xml file named according to the following rules:
- The topic id is used as the base file name;
- The selected language is appended to the id;
- The source file extension (xhtml by default) extension is added to the id and language code.
A topic with the id "installing_topico" written in English would be named installing_topico.en.xhtml.
Parts of the topic information, like the navigation title and the description, is copied to the master file to facilitate reusing this information through a single file. Most of the Tópico metadata is added to each XHTML topic as <meta/> elements in the file <head/> element.