HunspellXML Format (Metadata) - TrnsltLife/HunspellXML GitHub Wiki

HunspellXML   HunspellXML Format > Metadata


<metadata>...</metadata> (optional)

The elements inside metadata are used to create the plugins for LibreOffice, Firefox, and Opera. They can also affect the file name for the Hunspell .dic and .aff file. The <metadata> element and all its children are optional, but without it, the generated dictionary plugins will have no useful metadata. Example data is filled in below.

<metadata>
	<languageName>English</languageName>
	<localeList>en_US en_GB en_CA en</localeList>
	<filepath>mySubDirectory</filepath>
	<filename>myDicFilename</filename>
	<version>3.4</version>
	<license>Licensed under CC-BY-SA 3.0</license>
	<creator>Dr. R.G. English</creator>
	<contributors>
		<name>J.Q. Public</name>
		<name>John Smith III</name>
	</contributors>
	<dictionaryName>The Awesome English Dictionary, 3rd Edition</dictionaryName>
	<readme>Your really long ReadMe document can go here.</readme>
	<webpage>http://my.dictionary-website.com</webpage>
	<description>A long description of your dictionary goes here.</description>
	<shortDescription>A short description of your dictionary.</shortDescription>
	<firefoxVersion min="0.0" max="100.0" />
	<thunderbirdVersion min="0.0" max="100.0" />
</metadata>

<localeList>[list of locales]</localeList>

The <localeList> element contains a list of language codes (with their country codes). Each language code should be separated from the next by a space. The last item in the list can be a language code without a country code.

If the element under <settings> contains a bare language code with no country code, then you need to specify a language code + country code combination in <localeList> under <metadata>, otherwise the plugin for LibreOffice and will not function properly.

<filepath>[path to output file]</filepath>

If neither <filename> nor <filepath> is specified, the resulting Hunspell dictionary and plugins will be created in a directory with the same name as the <languageCode> value under <settings>, e.g. en_US. This directory will be in the same directory as the HunspellXML dictionary description file.

Otherwise, if <filename> is specified and not <filepath>, the Hunspell dictionary and plugins will be created in a directory with the same name as that specified in <filename>, which will be placed in the same director as the HunspellXML dictionary description file.

If <filepath> is specified, it may be either an absolute path, or a path relative to the location of the HunspellXML dictionary description file.

<filename>[output filename base]</filename>

If <filename> is not specified, the Hunspell dictionary files will be named based on the <languageCode> value under <settings>, e.g. en_US.

Otherwise, if <filename> is specified, the Hunspell dictionary will be named based on the value in <filename>. e.g. <filename>my_awesome_dictionary</filename> would result in my_awesome_dictionary.aff and my_awesome_dictionary.dic.

In the absence of a <filepath> value, <filename> will also determine the name of the directory the Hunspell files are placed in.

<firefoxVersion ... />

Attributes:

  • min [text] - the maximum version number this plugin is compatible with
  • max [text] - the maximum version number this plugin is compatible with

All Firefox plugins require the creator to specify the minimum and maximum versions of Firefox/Thunderbird that the plugin will work with. You can specify these values using the <firefoxVersion> element. Otherwise, the plugin will be given default values of 0.0 minimum and 100.0 maximum.

<thunderbirdVersion ... />

Attributes:

  • min [text] - the maximum version number this plugin is compatible with
  • max [text] - the maximum version number this plugin is compatible with

All Thunderbird plugins require the creator to specify the minimum and maximum versions of Firefox/Thunderbird that the plugin will work with. You can specify these values using the <thunderbirdVersion> element. Otherwise, the plugin will be given default values of 0.0 minimum and 100.0 maximum.

⚠️ **GitHub.com Fallback** ⚠️