On This Page
advertisement

GedSite will create sites in multiple languages. The GedSite program itself may also be used in multiple languages. Both facilities depend on translations of the text required by GedSite.

GedSite needs translators!

If you want to create a site in a language that GedSite does not yet support, and you are willing to do a translation, please read the information on this page. If you have any difficulty, please contact me. I will help you work through any issues.

Site Translation

The Language.Site Language property determines the language used for the output created by GedSite. There are two requirements for making a site in a particular language:

  1. Tag Types with sentences in the chosen language.
  2. Strings in the chosen language; "strings" are the words as phrases used by GedSite when making pages.

GedSite is supplied with Tag Types and Strings in several languages. You may edit those definitions, or you may create definitions for a new language.

  1. Change the Language.Site Language property to your language of choice. If your language of choice is not listed in that menu, please contact John Cardinal. (See email link in copyright notice at the bottom of this page.)
  2. Use the Utilities > Edit Tag Types > All Datafiles... command to edit the Tag Type definitions and supply the proper labels and role sentences for the given language.

    If there is no existing Tag Type translation file in the chosen language, GedSite will initialize the values using the English (United States) Tag Types.

    When translating Tag Types, do not change the Name value for standard GEDCOM tags. Leave those in English. The Name field is not used in the site generated by GedSite, it is only used to identify the Tag Type that should be associated with GEDCOM tags. The Label will appear in the site, and that is the value that needs to be translated.

  3. Use the Utilities > Edit Strings > All Sites... command to edit the strings GedSite uses when constructing the site.

    If there is no existing Strings translation file in the chosen language, GedSite will initialize the values using the English (United States) strings.

For a new translation, steps 2 and 3 will take significant time: there are a lot of Tag Types and a lot of strings. I will add user-contributed translation files to future versions of GedSite, so please consider sharing your work. Contact me for details.

User Interface Translation

The GedSite program uses about a thousand text values in its user interface. The values are stored in an XML file, with one file for each language supported by GedSite.

To create a new translation file:

  1. Use the Customize > Language submenu to select the desired language.

    If there are no current translation values available, the GedSite user interface menus and property labels will show English values. If there are some translation values available, the GedSite user interface menus and property labels will show a mix of text in English and text in the desired language.

  2. Use the keyboard command Shift-Ctrl-L to create a new translation file.

    GedSite will create a new XML file with translation values as shown in the user interface. As explained above, the values will be in English if there are no current translation values available, and the values will be a mix of English and the desired language if some translation values are available.

  3. GedSite will prompt you to confirm that you want to save the new translation file. Choose [OK].

The new file will be saved in this folder:

C:\Users\<user-name>\Documents\GedSite\Languages

In the example path above, the <user-name> will your user name.

The name of the XML file will be the culture code for your chosen language. (There is a partial list of culture codes below.) For example, a Canadian French translation will be named fr-ca.xml.

Do not move or rename the file. The name and location are governed by rules GedSite uses to find translation files. If you move or rename the file, GedSite won't be able to find it, or won't know what it contains.

Editing Values

As of version 5.01, GedSite does not have an editing tool for the User Interface XML files. Here are some instructions for editing them with an XML or text editor.

  • The file has many P (property) entries like this:

    <p k="theme-backcolor" v="Colors, Backgrounds" />

    Do not change the K (key) attribute. Change only the V (value) attribute. To change the English (United States) entry above to English (United Kingdom), you would edit it as follows:

    <p k="theme-backcolor" v="Colours, Backgrounds" />

    The Key value indicates where GedSite uses the text. The general format is "group-name.property-name", where the group-name identifies a set of related properties. The property-name is missing for the name of the group, as it is in the example above.

    Many group names indicate a section that appears in the list on the left-hand side of the main window. However, there are many other groups, including groups for User Items and menus.

    It's important to recognize where the text is used. If you translate the words without considering where they are used, you may find the results confusing.

  • Some entries include default values for properties:
    <p k="build.date-prefix" v="Date Prefix">
      <dv dv="on" />
    </p>

    The DV attribute is the "default value". For these entries, you must supply values for the V attribute and all the DV attributes even if you only need to translate one. In other words, do not delete any DV entries.

  • Some properties have lists of allowable values, and the list entries have to be translated. For example:
    <p k="exhibits.personprimary-document" v="Person (primary)">
      <e k="ignore" v="Ignore" />
      <e k="link" v="Link" />
    </p>

    The E elements (enumerations) have K (key) attributes and V (value) attributes. Like default values described above, you must supply values for the V attributes even if you only need to translate one. Do not change the key, only the value.

  • Some entries include numbers or keywords inside the { and } characters. Do not translate the text inside the { and } characters, such as "input-path" in:
    <dv dv="{input-path}" />
  • After editing the XML file and saving it, GedSite will use the new values if you either (A) restart the program or (B) switch to another language and then back to the language whose file you are editing.

Exceptions

Some components of GedSite are not translatable.

  1. Some properties use the names of script files as values. Those items cannot be translated.
  2. Property names in the Style sections use CSS attribute names. Those property names are not translated.
  3. Log files are currently written in English (United States) only.

Culture Codes

The following table includes a partial list of culture codes. Culture codes are used to choose a language in GedSite because they identify a specific variant of a language and also represent standards for other factors such as numeric formats.

The list is limited to cultures where my other programs have been used. You may use one of the culture codes below, or any culture code supported by Microsoft's .NET framework.

CodeDisplay NameTranslation by
Strings and TagsProgram
af-za Afrikaans (South Africa) John CardinalNote 1
da-dk Danish (Denmark) John CardinalNote 1
nl-be Dutch (Belgium) Jan Verhavert Jan Verhavert
nl-nl Dutch (The Netherlands)
en-au English (Australia) Neil Bradley
en-ca English (Canada)
en-za English (South Africa)
en-gb English (United Kingdom) Neil Bradley
en-us English (United States)
fi-fi Finnish (Finland) Esa Lahtomaa
fr-be French (Belgium)
fr-ca French (Canada)
fr-fr French (France)
de-de German (Germany) Vera Nagel
John CardinalNote 1
it-it Italian (Italy)
nb-no Norwegian, Bokmål (Norway) Torleif Haugødegård
John CardinalNote 1
pt-pt Portuguese (Portugal)
es-mx Spanish (Mexico)
es-es Spanish (Spain)
sv-se Swedish (Sweden) Christer Siverud (partial)Note 2 Christer Siverud (partial)Note 2

Notes

  1. Tag Types only
  2. When a translation is marked "partial", it has been adapted from a translation for a different program and is incomplete for that reason.