Free and Open Source real time strategy game with a new take on micro-management

Difference between revisions of "Translation guide"

From Globulation2

Jump to: navigation, search
Line 34: Line 34:


* First you have to find an text editor that supports the UTF-8 encoding system
* First you have to find an text editor that supports the UTF-8 encoding system
** If you use linux:
** If you use a linux-based operating system :
*** try gedit; it works fine if you use the X; (gedit was originally designed for the GNOME and was tested by me to work well, but you may as well find many other editors designed for the desktop you are using right now)
*** try gedit; it works fine if you use the X; (gedit was originally designed for the GNOME and was tested by me to work well, but you may as well find many other editors designed for the desktop you are using right now)
*** Other editors in linux can edit text in UTF-8 format, but a simple ASCII text editor is not enough!!! so if you open the file with emacs or nano or nedit and you cannot see the special characters then don't edit the file as a simple ASCI text file
*** Other editors in linux can edit text in UTF-8 format, but a simple ASCII text editor is not enough!!! so if you open the file with emacs or nano or nedit and you cannot see the special characters then don't edit the file as a simple ASCI text file

Revision as of 00:21, 20 December 2005

This guide will explain you how the translation are done and help you to create a new one, such as your language. You do not and will not need to know anything about programming to do a translation.

Understanding the translation system

First, some steps you should follow if you want your translation to succeed fast and if you want to do it "the right way":

  • First of all you have to understand that in the data/ directory, there are many "texts.*.txt" files, two of them are particular:
    • data/texts.list.txt - this is only a list of all known translation files; the first file is the file of keywords
    • data/texts.keys.txt - the file of keywords, it is not a translation, and should never be modified if you are not a developper
    • data/texts.LANG.txt - this are many files, one for each translation, you have a list down here
  • Now you have to see if the latest version of the game is not yet translated in your language.
    • We try to list all current translations (11 by November 2004); they are located each in a different file:
      • /where_glob2_is/data/texts.en.txt -- English
      • /where_glob2_is/data/texts.fr.txt -- Français
      • /where_glob2_is/data/texts.es.txt -- Español
      • /where_glob2_is/data/texts.de.txt -- Deutsch
      • /where_glob2_is/data/texts.cz.txt -- Česky
      • /where_glob2_is/data/texts.hu.txt -- Magyar
      • /where_glob2_is/data/texts.it.txt -- Italiano
      • /where_glob2_is/data/texts.pl.txt -- Polski
      • /where_glob2_is/data/texts.ro.txt -- Româneste
      • /where_glob2_is/data/texts.ru.txt -- Русский
      • /where_glob2_is/data/texts.sr.txt -- Српски
  • Then, you must download the latest "texts.en.txt" file from here
    • You can find this file into the data/ subdirectory of your globulation 2 main directory; use this option only if you have the latest CVS version.
    • It is suggested to follow the English as base of your translation; however, it happends some times you may want to help yourself by looking at other translations that are in a language that you understand better and that is closer to your native language. You can find all other languages here.
  • Now you can rename "texts.en.txt" into "texts.LANG.txt", where LANG is usually two letters representing your country/language
  • Then you can edit "texts.LANG.txt" See below details about translating your file.
  • After you have translated the file, you should first try to test it works well on the latest version of glob2. To do that, you must place your file into the data/ directory of the game, and then edit the file "data/texts.list.txt" and add at the end of the file the line "data/texts.LANG.txt"; PS: do not add this as first line or it will not work!
  • You can later launch glob2 as you usually do and test how well your translation looks...
  • Please read the Links to see how you can upload files to the ftp in the translation directory; please notify the developers on the forum and/or the mailing list; your translation will be integrated in the cvs and the next version of glob2 will include your translation.

How to edit the texts.LANG.txt file?

  • First you have to find an text editor that supports the UTF-8 encoding system
    • If you use a linux-based operating system :
      • try gedit; it works fine if you use the X; (gedit was originally designed for the GNOME and was tested by me to work well, but you may as well find many other editors designed for the desktop you are using right now)
      • Other editors in linux can edit text in UTF-8 format, but a simple ASCII text editor is not enough!!! so if you open the file with emacs or nano or nedit and you cannot see the special characters then don't edit the file as a simple ASCI text file
      • Don't try to use advanced editors like OpenOffice, it will not do the work at all!
    • In windows:
      • notpad is probably not a good choice; Office or OpenOffice neather...
      • FIXME a windows editor using UTF-8 encoding
  • Then, you must understand the structure of the file:
    • Every line is separated with the others by the ENTER character (new line)
    • You have many lines, they are two by two linked like this:
      • TYPE A lines: these lines look something like this: [code-name of the text]
      • TYPE B lines: these lines contain the translation of the text into one language. Even if there is no translation you have to press enter (leave the line empty)
    • The two last lines of the text are empty lines (two new-line characters)
  • Now you must understand that all TYPE A lines are only code-names; this means, first of all you should never try to change them, unless you are a developer; second, you should never translate what is inside, they are codes, DO NOT translate them.
  • Now please translate each TYPE B line into your language by replacing the text in English with the text in your language.
Misc