GBrowse Configuration/I18n

From GMOD
Jump to: navigation, search

This article describes internationalization in GBrowse.

For the main GBrowse configuration article, see: GBrowse Configuration.

Internationalization

See: GBrowse Configuration/I18n.

GBrowse is partially internationalized. End-users whose browsers are set to request a non-English language will see the GBrowse main and secondary screens in their preferred language, provided that GBrowse has the appropriate translation file.

Translation files are located in gbrowse.conf/languages/ and use the standard two-letter language abbreviations, such as "fr" for French, as well as the regional abbregiations, such as fr-CA for Canadian French. Currently there are translation files for French, Italian, and Japanese. If your favorite language isn't supported, you are encouraged to create a new translation file and contribute it to the GBrowse development effort. Please contact Lincoln Stein (lstein@cshl.org) for help in doing this.

If the end user does not specify a preferred language, GBrowse will default to "en" (English). You can change this by placing a "language" option in the configuration file somewhere inside the [GENERAL] section. For example, to make Japanese the default, create this entry:

 language = ja

GBrowse will still use the end-user's preferred language in preference to the default if the preferred language is available.

Although GBrowse automatically changes the text and button language, it can't automatically translate the track labels. If you would like the track labels to localize, you will have to provide your own translations in the "key", "citation" and "category" options. The syntax is similar to that used for semantic zooming:

 [gene]
 glyph   = transcript
 feature = transcript:curated
 height  = 10
 key     = Named Gene
 key:fr  = GËnes NommÈs
 key:it  = I Geni dati un nome a
 key:sp  = Los Genes denominados
 category = Genes
 category:fr = GËnes

The option is followed by a colon and the two-letter language name to indicate that when the page is being displayed with this language, to use the indicated value of the option. The option without the colon is the default. You may enter accented and umlauted characters directly, as shown, or use the HTML entities. Non-English character sets, such as Japanese, should also work correctly, provided that the translation file indicates the correct character set to use.

HELP FILES

The GBrowse help files are in English. Although there is support for internationalizing the hep files, no one has done this yet. If you are industrious and wish to translate the help files into your favorite language, find the two help files where they are located in htdocs/gbrowse/. One is named general_help.html, while the other is named annotation_help.html. Translate them, and create new files with the language prefix appended to the end. For example, the French translation of annotation_help.html would be annotation_help.html.fr.

LIMITATIONS
  • There is no localization support. For example, GBrowse will print large numbers using commas (e.g. 1,234,567) instead of periods, even when talking to a European browser.
  • Although the HTML frame around the GBrowse genome image will use the appropriate character set, the overview and detail images themselves are limited to Latin alphabets. This is because of limited native character support in the GD library used by GBrowse. When a non-Latin character set is called for, such as Japanese, GBrowse will use Japanese for the frame, but English for the image.
  • The rate at which the GBrowse team adds new features to the browser often outstrips the ability of volunteers to update the translation files. This means that new buttons and fields may be displayed in English on an otherwise correctly internationalized page.