Add a new language or dialect dictionary

You can add dictionary files to the CCMS to support more languages or dialects.

The dictionary files used by IXIASOFT CCMS are located in the /system/dicts collection. There are two files that handle dictionary processing per language:

  • a [language].aff file, which handles the rules (hyphenation, prefixes, affixes, etc.) relating to the target language
  • a [language].dic file, which contains the word list for that language

By default, at least one language dictionary will already be installed.

The CCMS uses the Hunspell dictionaries, which are freely available to download and use.

Important: The abbreviation used for renaming the dictionary in the following procedure must match the language setting within the prolog of a map/topic, e.g. xml:lang="en-us".
Note: You should make these configuration changes in the Test environment and test them before copying them to the Production environment. In a dedicated SaaS deployment, after testing the changes, ask IXIASOFT Customer Support to copy the changes to the Production environment.
  1. Locate the source of a Hunspell dictionary for the language or dialect that you are interested in.
    A popular resource for the Hunspell dictionaries can be found on SourceForge. Go to: https://github.com/wooorm/dictionaries, and then click Clone or download > Download ZIP.
  2. Open the downloaded zip file, and choose the appropriate language folder to add. Transfer the index.aff and index.dic from that folder to your local system.
  3. Rename the index.aff and index.dic files so that they are identifiable as a separate language or dialect. The folder the files are derived from provide the language code to use.
    For example, if you were adding the German dictionary, you could rename index.aff and index.dic to de-de.aff and de-de.dic. If you are adding a dialect, such as British English, you could rename the files to en-GB.aff and en-GB.dic instead.
    Note: The name of these files should follow a 4-letter convention describing the language followed by the dialect. Also, the case used must match that used by xml:lang within the map and topic templates.
  4. Within TEXTML Administration, navigate to /system/dicts.
  5. Right-click on dicts, select Insert documents. Click Add file, select the two renamed dictionary files located on your system, then click OK.
  6. The next step is to place a second copy of these files in the /system/dicts/customs collection, which allows for additional, customized words for that language to be added. Open the renamed [language].dic on your local system.
  7. Select all of the content within the file, and delete it. Replace it with 0 in the first line of the file, followed by a carriage return. The content of the file should look like the following:
    0				
    				

    This tells the system that there are zero lines to read from in this file. This will increase automatically as new terms are added by the writers to the dictionary.

  8. Save the modified [language].dic file.
  9. Within TEXTML Administration, navigate to /system/dicts/customs.
  10. Right-click on dicts, select Insert documents. Click Add file, select the two renamed dictionary files located on your system, then click OK.
  11. Within TEXTML Administration, navigate to /system/conf and open languages.xml.
  12. If the new language/dialect is not present, add the following lines, where [language] equals the 4-letter code used by the xml:lang within the topic templates:
    	<language groups="[language group name]" name="[full name of language or dialect]">
    		<code type="ISO-639-1">[language]</code>
    		<code type="ISO-639-2/B">[language]</code>
    	</language>

    For more information on the [language group name] and [full name of language or dialect], examine the other examples within this file, or review the ISO-639-2 code list, available from: loc.gov/standards/iso639-2/php/code_list.php.

    Note: Adding a new, active language to this file in addition to an existing one will automatically prompt the user, when creating a new map or topic, to choose the language, which is then expressed in the xml:lang of that map or topic.
The dictionaries are added and are active with the CCMS.