Language editing

Add your own language and edit existing language files


Update! The process in this guide has been replaced with the Localization Editor.

This old guide shows you how to edit existing language files and add new languages to your GpsGate Server installation.

If you want to know how to install a language you can find more information here!

Language file basics

English language files are installed with GpsGate Server. Other languages can be selected in the install wizard or you can install them later as language plugins from the SiteAdmin / Plugins page.

Some feature plugins add their own language files at installation, for example the AreaSearch plugin adds the language file AreaSearch.english.lang.

There are currently (June 2013) 17 English language files in total.

Language files are stored in the ..\GpsGateServer\IIS\Resources\Languages folder, as shown below.

A language is identified by the <Language lng=“english” enablecache=“true”> key in the beginning of the language file. This is also the text that is shown in the user interface when you select a language (note that the filename is not used for identification).

Important: Language files distributed by GpsGate are overwritten when a new version is published, so if you change a language file you should create a copy with a different file name to prevent it from being overwritten.

All language files, except English and Swedish, are contributions from our community. When new functionality is released phrases that have not yet been translated will be shown in English.

Please contact us if you have an updated language file that you would like to share!
If you want to help us maintain a language we are happy compensate you with server licenses.
Please send an email to “support @ gpsgate . com” for more information.

New language translation

If you start with a new language from scratch you should create copies of all the English language files on your server and rename them to your language.

  1. Copy the files you want to translate and rename to the new language:
    Example: Copy and rename english.lang to New_language.lang

    Note: It is important that all files are stored in UTF-8 format (this is required to support any local characters).
  2. Change the language key in the beginning of all the copied files as shown below:
    from: <Language lng=”english” enablecache=“true”>
    to: <Language lng=”New language” enablecache=“true”>
  3. Translate only the text between the Phrase tags in your copied files as shown in the samples below:
    Eng: <Phrase key=“Delete”>Delete</Phrase>
    Swe: <Phrase key=“Delete”>Radera</Phrase>

    Eng: <Phrase key=“Data has been successfully saved.”>Data has been successfully saved.</Phrase>
    Swe: <Phrase key=“Data has been successfully saved.”>Informationen har sparats.</Phrase>

    Note: Do not change the English Phrase keys when you are translating the phrases
  4. Save the translated files in the ..\GpsGateServer\IIS\Resources\Languages folder

Login to SiteAdmin when you are done. Go to Settings / Localization and click on Rescan languages and measurements to load the files.

Now your “New language” is available for selection in the language selection lists.

As mentioned above, please contact us if you have an updated language file that you would like to share!

Updating an existing language

If a language key is missing in a translation the phrase in the user interface will be shown in English. This is most likely because the translation is old or incomplete.

Follow these steps to add phrase keys to an existing language file:

  1. Open both the existing translation and the corresponding English language file in an editor
  2. Go to the end of the translated file and look up the version value of the latest added section (like <Version value=“3.1.0.4641”>)
  3. Copy the sections with higher version values from the English file to the translated file. Be careful to keep the XML formatting correct, copy entire sections from <Version ...> to </Version>
  4. Translate the new sections to your language as shown in step 3 in the paragraph above
  5. Save your file

Note: Make a copy of your translated file as it will be overwritten if you update your language plugin from SiteAdmin.

As mentioned above, please contact us if you have an updated language file that you would like to share!

Language files that don’t work

The most common problem is that you make an error that breaks the XML, so be careful to keep the XML formatting intact. To check the formatting, rename your file from .lang to .xml and open it in a web browser. You will be notified if the XML can not be read properly by the browser.

Another common mistake is to forget to set the correct <Language lng=“New language” enablecache=“true”> key in the beginning of the file. Maybe your new file is still set to english?

And finally, you need to save the file in UTF-8 format to keep local characters readable.

More language related links

Report translation
How to customize units and measurments
Login / logout from your home page, use your own logo

 


  Discuss this blog post on the forum please

  Make sure to subscribe to our newsletter if you don't want to miss out on anything.



Download free GpsGate Server

Install it on your own server. The installation is free for 5 users.

Download Now