Report Language Dictionary (Dictionary.xml)
The language dictionary contains the text for translating English to a
foreign language. The language dictionary is divided into sections to translate menus, dialogs, messages, and
enumerations. In the future, GenoPro will include built-in language dictionaries, so a report may utilize one of those dictionary
by specifying the
Language attribute in the
configuration file.
If you are creating a new report in a foreign language, you need to
translate the enumerations so the report generator can display the proper text for enumerated values. An enumeration
is a textual name representing a collection of possible values such as a gender or a cause of death.
<Dictionary Language="EN">
< Authors>
<Author Name="GenoPro"
DateFirstModified="Aug-2004" DateLastModified="2005" Contact="https://www.genopro.com/" Comment="Creation" />
</Authors>
< Enumerations>
< Date>
<Jan T="Jan" />
<Feb T="Fév" />
<Mar T="Mar" />
</Date>
<CauseOfDeath>
<War T="Guerre" />
<Cancer T="Cancer" />
<Medical
T="Problème Médical"/>
</CauseOfDeath>
<Gender _Blank="Gendre Inconnu">
<M T="Homme"/>
<F T="Femme"/>
<P T="Animal de Compagnie" />
</Gender>
<FamilyRelation>
<Marriage T="Marriage"
/>
<Nullity T="Annullement" />
</FamilyRelation>
</Enumerations>
< ReportGenerator>
<_NoName T="<Sans Nom>" />
<_Husband T="Mari" />
<_Wife T="Femme" />
<_And T="{0} et
{1}" />
</ReportGenerator>
</Dictionary>
This is the root node of the dictionary file, as required by the XML
standard. GenoPro assumes UTF-8 (Unicode) if the encoding is not specified in the file.
Language:
At the moment, this attribute is not used by GenoPro, however it is
useful to specify the correct language for troubleshooting. In the future GenoPro will use the Language
attribute to chain dictionaries together. In other words, a dictionary will be able to "include" another dictionary, so there will
be no need to have redundant translation.
<Authors>
Brief history of each author having modified the dictionary file. The
purpose of this list is to give credit to the contributor(s) and provide a method to communicate with them if necessary.
If you modify the language dictionary, add your name at the end of the list. If you are writing a new skin from scratch,
remove "GenoPro" from the author list.
Author Name:
Name of the author having modified the language dictionary. This could be
your given name, your alias or the name of your corporation. GenoPro will display the last entry in the
author list as the author of the dictionary. In the future, the same language dictionary may be shared by multiple skins, so
it is recommended you enter your name to both the dictionary and the configuration file.
DateFirstModified and DateLastModified:
A rough idea when the author started translating the dictionary as well as
the time he/she made the last update. Those values may overlap as multiple authors may translate the same
dictionary. There may be gaps where nobody translated the file. In the future, GenoPro may display those values, but in the
meantime those values are purely informative to the people translating the the file.
Author Contact:
Contact information of the author. It is recommend not to use your email
address because of spam, and the likelihood your email address becomes invalid. It is better to include your
home page as contact information because you can include your email address to your website. Other contact information may
be your street address if you really want to. If you wish to retain your privacy, leave this field blank.
Author Comment:
This is a comment describing what was translated in the dictionary. The
comment may be the name of a new enumeration that was added since the previous version, or a corrected typo. It
is highly recommend to write your comment in English. The language dictionary is a translation from English to another
language, so it is assumed the reader does have basic understanding of English. Eventually GenoPro will keep a list of available
dictionaries for download, so it will help us to provide comments in English as we may need to merge XML files to keep the
master dictionary up-to-date.
At the moment, this is the only section of interest for translating a
report. Each enumeration has a name, so it can be shared by multiple data fields. One example is the Date
which is shared for the birth, death, anniversary, and so on. To translate an enumeration, just modify the
content of the T attribute. If an element is missing, GenoPro will use the English text. This way, you do not need
to translate everything at once and/or GenoPro can add new features to GenoPro without discarding your work.
The attribute name _Blank is reserved for
an element without a name. For instance, GenoPro did not assigned a name for the element "unknown gender".
GenoPro could have used the name "U", however the decision was made to not export the value "unknown gender". Consequently,
any individual without an explicit gender (M, F, P) is interpreted as "unknown gender". GenoPro displays the question mark (?)
in the genealogy tree, however internally the gender enumeration is unassigned. If you want to specify text for a nameless
element, you have to use the _Blank attribute.
Tip:
Each enumeration can be found in the Tag Definitions dialog (Menu -> Tools
-> Tag Definitions). Double-click on the enumeration, and GenoPro will "copy" the enumeration into the
XML format to the clipboard. All you have to do is paste it and translate the text. This will save you great time, in
addition to provide you the complete enumeration.
This section is used by the report generator. You are welcome to include any
text that is subject to translation. In theory, all the text for a report could be stored in this section, so
translating a report to a foreign language would require only to translate the sections <Enumerations> and
<ReportGenerator> . This has not been done yet because of time constraints. Once the report
generator has matured, GenoPro will offer a true "generic report" where all the text will be in the language dictionary.
Usage:
To access a value from the language dictionary, use the LanguageDictionary object.
Special Keywords:
Any keyword starting with the underscore (_)
character has a
special meaning for GenoPro.
Keyword |
Use |
_NoName |
The keyword _NoName is used whenever an empty name has to
be displayed. For instance, if the method HtmlHyperlinks encounters a blank name, it
substitutes that name by the value of the _NoName keyword
before creating the hyperlink. |
_Husband |
Used when the name of the husband is blank. |
_Wife |
Used when the name of the wife is blank. An example is "André and Wife" |
_And |
Used to create the name of a family. An example is "André and Hélène".
In French, the keyword value would be "{0} et
{1}" to produce
"André et Hélène". |
Performance Notes:
Both the <Enumerations> and the <ReportGenerator>
sections are designed to handle
large amount of entries without affecting speed performance.
|