Languages and Language Packs

How to Create a Language Pack

Before creating a language pack, you should first check whether the language pack you require already exists or not - see How to Install a Language Pack.  If the language pack you want isn't available (or there is one, but it isn't adequate for your purposes), you can create your own.

If you decide you want to create a new language pack, you should ask yourself what you want this language pack to do. Typically, a language pack for a given target language, will serve some or all of the following functions:

Think about what you want to achieve and keep this in mind as you proceed.

To create a new language pack, open the Language Packs window once again (click on Language Packs on the Tools menu) and click the New button.  Fill in the details required (in two dialogs: New Language Pack - Step 1 and New Language Pack - Step 2), and a new language pack will be created.  Creating it, however, is just the start of the process. A newly-created language pack does not do very much.  The work involved in building a properly-functioning language pack consists of the following steps (not necessarily in this order):

Some of the work has already been done for you, however, when you created the language pack.  Family Historian will have created language variants of text schemes for example.  It will also have created a 'skeleton' version (a first draft version) of the language plugin.  And it will have supplied some of the values that need to be translated in the language pack translation tables. The following sections look at each task in more detail.

Bear in mind that all the work done in all of these sections, is saved in files, which form part of the language pack.  If you export the language pack, all of these files will be included in the export.  Equally, if you delete the language pack, you will delete all of these same files.

Updating the Language Plugin

This is the most complex of the various tasks, and potentially the most daunting.  Anyone who is already familiar with Family Historian plugins should not find it a problem.  But if you haven't got previous experience of working with plugins (and especially if you have no previous experience of computer programming or writing scripts), we recommend that you consider seeking advice from more experienced users.  Hopefully, even if you have no confidence in your own ability to change plugins, you may find some other Family Historian user who is willing to help (e.g. at the Family Historian User Group website www.fhug.org.uk). Language plugins are at the heart of the way language packs work.  They are tremendously powerful and can be used to provide any special processing your language may require.  You can view the skeleton plugin that has been created for you, when you created your new language pack, by selecting your new language pack in the Language Packs window, and clicking the Plugin button.  The plugin itself contains comments describing some of the things you need to do.  Search for the text "TODO" to find various tasks you need to do - starting with two tables at the top of the plugin, containing a list of month names that need to be translated, and a list of number adjectives ('First', 'Second', etc).  There are numerous occurrences of "TODO" throughout the plugin, each accompanied by suggestions of proposed, or possible, changes you may need to make.

Creating language variants of diagram text schemes

The text displayed in boxes within diagram trees, is determined by diagram text schemes (see Diagram Options Dialog: Text Tab), and these too can be translated using language packs.  In fact much, if not all, of the work needed here should already have been done for you when you created the language pack.  However, you can modify or extend the work done at any time.  To view language variants of text schemes, open a diagram (any one will do), and then open diagram options (e.g. click on Options on the Diagram menu).   Select the Language tab and pick your new Language Pack.  Then, still within Diagram Options, click on the Text tab.  Notice that the language you chose is shown on the right-hand side (above the Margins & Tabs button). The tab shows a list of standard and custom text schemes, that you can choose from.  Each text scheme specifies the content to be displayed in a diagram.  To try one out, select and click the Apply button.   Every text scheme that has a green tick showing in the rightmost column (labelled 'Lang') has a language variant associated with it.  Select any item in the list, and press Edit Language Variant to edit the language variant.  If you choose an item that doesn't already have a language variant, you will be prompted to create one, by copying the 'base-level' version.

Bear in mind that although you edit language variants for text schemes in this dialog, it remains the case that the files associated with language variants are stored as part of the language pack.

Creating language variants of Fact Definitions

Creating language variants of fact definitions is a very important step (especially for translating and rendering reports).  No work will have been done for you in this area, during the process of creating the initial language pack.

To create language variants of fact definitions, click on Fact Types on the Tools menu.  Pick the first fact in the list and press the Edit button to open the Fact Definition dialog for that fact.  Within that dialog, press the Go To Language Variant button.  Choose your new language pack from the dropdown list that appears.  Fill in the required fields in the Fact Definition Language Variant Dialog (using the base-level values as a model).  You should do this for all fact types.  Use the Next and Previous buttons to quickly and easily 'step' through each fact type in turn, until you have translated all of them.  Press the Help button for more help on doing this.  Be sure to translate not just the core fact values, but also the associated roles (for 'witnesses') if any.

Once again, bear in mind that although you edit language variants for fact definitions in this part of Family Historian, it remains the case that the files associated with these language variants are stored as part of the language pack.

Note: At a minimum, we recommend that you translate all standard and custom fact definitions.  Better still, translate the Extended Set too.  The Extended Set of fact definitions are hidden by default, so you probably need to tick the Show Hidden tick box, on the right-hand side, to view them. 

Supplying all necessary translations for language pack translation tables

Translation tables are accessed by the language pack plugin; however, they can be edited easily and separately.  To view these tables, open the Language Packs dialog once again (click Language Packs on the Tools menu), select your language pack and click the Edit button (or just double-click on your language pack in the list).  The translation tables are displayed in the Language Pack Translation Tables Dialog.  There are 3 tables, and all of them are accessible from the same window (see options at the top of the window).  The translation tables are:

All 3 tables already contain a list of items of text (in the 'From' column) that need to be translated (the translations will be listed in the 'To' column).  We recommend that you translate all values in all 3 tables.  Later, you may find that you need to add additional values to all 3 tables.  But initially you can concentrate on translating the values that are already listed.

To translate an item, select it and cick the Edit button (or just double-click on it); then type the translation into the "Translate To" box and press Save to save it.  Click the Help button for advice on special case handling.

The Miscellaneous table, as the name suggests, lists miscellaneous items that need to be translated - such as report titles, and report headings.

The Attributes Values table lists translations of attribute values.  An attribute is a fact type such as Education or Occupation.  The value for an Occupation attribute might, in English, be 'Engineer' or 'Farmer'.  Attribute values only need to be translated from the project language into the output language, if these are different.  For example, if your project language is French, an attribute value might be 'IngĂ©nieur' (i.e. engineer).  If you are rendering your output in French, no translation is required.  However, if you are rendering English into French, a translation is required.  If you supply a translation of 'Engineer' as 'IngĂ©nieur', Family Historian knows to only make use of it, when doing other language translation, and not when doing same language rendering.

Finally, the Places table is used to translate place part names.  A complication about place part names is that some are translated, but not all.  And the decision about which place names are translated, varies from language to language.  It is up to you to decide which place part names to translate.  For example, if you were creating a French language pack and you had a place name like "Greenwich, London, England", you might decide to translate "London" and "England" (to "Londres" and "Angleterre"), but not translate "Greenwich".

As with Attribute Values, Family Historian will by default only use the Places table for translations, if it is actually using the language pack for other language translation, as opposed to same language rendering.

Add a SpellCheck dictionary to your language pack

Spellcheck dictionaries for most languages are freely available on the Internet.  With very little effort you can add one to your language pack, so that anyone who installs your language pack can have spellcheck in that language. For instructions on doing this, please see How to Add a Spellcheck Dictionary to your Language Pack.

Consider Submitting Your Language Pack to the Family Historian Plugin Store

If you have completed your language pack, please consider submitting it to the Family Historian Plugin Store, so that others can benefit from your work - even if there is already one or more language packs in the Plugin Store, for your target language. Your language pack may be better than others, or have a different style.  Some language packs may have a specific role and not cover all the functions that yours provides.  In any case, it's good for users to have a choice.  For more on this, please see How to Share Your Language Pack with Others and How to Submit a Language Pack to the Plugin Store.