Content declarations
Content properties are new with version 3.0.Properties
With the content properties you can specify that there is a pronunciation
part, an explanation part, etc. For each content you can specify font
colour, font style and more.
The content is specified for each languageX.
- languageXNumberOfContentDeclarations
Defines how many content-declarations exist for this dictionary. For each content-declaration the contentNN-properties need to be defined as described below. Note: all contentNN-properties must have two digits: content01..., content02..., content03 etc !
The property languageXNumberOfContentDeclarations is optional. When
this property is not set, then DictionaryForMIDs does not scan for
content tags in the dictionary.
- languageXContentNNDisplayText
Text that is used on the user interface to identify the content. NN
needs to be replace with the content number. For example:
language1Content01DisplayText: contentDefinition
language1Content02DisplayText: contentPronunciation
...
language1Content05DisplayText: Pinyin
Predefined content is prefixed by "content". The following content is
predefined in DictionaryForMIDs:
contentDefinition
contentPronunciation
contentGrammaticalCategory
contentOrigin
contentSampleUsage
contentNotes
* Note: "contentDefinition" and "contentNotes" will become available in version 3.0.3
For predefined content there are default values for font colour, font style etc. If you do not want to use Predefined content, then you may choose any other name for languageXContentNNDisplayText.
- languageXContentNNFontColour
Defines the font colour for the content. Font colour is specified as 'RRR, GGG, BBB' where RRR is the value for red, GG for green and BBB for blue. RRR, GGG, BBB each can have a value between 0 and 255.
Example for yellow colour:
language1Content01FontColour: 0,255,255
This property is optional.
You are free to choose any color you wish using the RGB color codes. But, if you wish to use "traditional colors", then here is a list of the 16 most common colors.
| Maroon | 128,0,0 |
| Red | 255,0,0 |
| Yellow | 255,255,0 |
| Green | 0,128,0 |
| Lime | 0,255,0 |
| Navy | 0,0,128 |
| Blue | 0,0,255 |
| Teal | 0,128,128 |
| Aqua | 0,255,255 |
| Purple | 128,0,128 |
| Fuchsia | 255,0,255 |
| Olive | 128,128,0 |
| Gray | 128,128,128 |
| Silver | 192,192,192 |
| Black | 0,0,0 |
| White | 255,255,255 |
- languageXContentNNFontStyle
Defines the font style for the content. Allowed values are:
bold
italic
underlined
plain
Example for underlined text:
language1Content01FontStyle: underlined
This property is optional, the default value is plain.
- languageXContentNNDisplaySelectable
A boolean property with either the value true or the value false. Set
to true when the user can turn on or off the display of this content.
Set to false when this content is always displayed, i.e. the user cannot
turn off the display of this content.
This property is optional, the default value is true.
This property will be supported in a later version.
Content tags for the dictionaries
In the dictionaries the content parts are marked with the following syntax:
Each content has a start delimiter at the beginning and an end delimiter at the end.
Start delimiter:
[NN
where NN is the content number. This needs to be a two-digit number !
End delimiter:
]
To use a [ or ]-character in the text (without content syntax) a \ must
be prepended: \[ and \]
A newline-character is \n and a tab is \t
Contents can be nested.
Here is an example for a language2 column:
-
dictionary [01dikshionari] [02noun] [03\nA book that contains translations for words.]
In that example the following properties are declared:
language2Content01DisplayText: contentPronunciation
language2Content02DisplayText: contentGrammaticalCategory
language2Content03DisplayText: contentNotes
Contents can also be nested. Example:
-
dictionary [01dikshionari] [03\nA book that contains translations for words. [02noun]\nAlso exists in electronic form]