RUS New site

Advanced search

[ New messages · Forum rules · Members ]
Page 1 of 131231213»
Forum » SpaceEngine » Mods and Addons » MOD - Creating localizations 0.97 (Translations into another language)
MOD - Creating localizations 0.97
SpaceEngineerDate: Tuesday, 21.05.2013, 13:37 | Message # 1
Author of Space Engine
Group: Administrators
Russian Federation
Messages: 4799
Status: Offline
Last update: March 03, 2015 (version 0.972)

SpaceEngine stores all language-related files in the folder locale/. Full localization consists of 5 files. The name of each file begins with short language abbreviation, like eng, rus, ger, etc. This abbrevation is shown in the change language menu and used by SE to recognize all files, associated with this localization. In this tutorial I will use abbreviation loc, but you must replace it with your own one. The localization files are next:

  • [Required] The script file with translations of all text strings of the SE interface: loc-gui.cfg
  • [Required depending on your language] The font texture winXXXX-font.png
  • [Required depending on your language] The font configuration script winXXXX.cfg
  • [Optional] The main menu texture loc-menu.png
  • [Optional] The in-game wiki database script loc-db.cfg

    The translations script

    loc-gui.cfg

    This file is the main file of localization. It is a text file with this structure:

    Code

    FontConfig    "Win1252-font.cfg"
    FontTexture    "Win1252.*"

    "Galaxy"  "Galaxie"
    "Quasar"  "Quasar"
    "Cluster"  "Sternhaufen"
    "Nebula"  "Nebel"
    "Star"   "Stern"
    "Planet"  "Planet"
    ...


    The first two parameters is the name of the font config script and font texture (look the next paragraph). After them there are many-many rows, consists the default SpaceEngine's GUI string in English and your translation for them into your language. The file should be in your national code page format (not Unicode). You may use text editors like Notepad++ which automatically choose the proper code page.

    It is possible to miss some translations - SE will show default English string for them. If you have untranslated strings, SE will print warnings in the log (system/se.log), and in the in-game console:

    Code

    WARNING: loc.SetLocalization(): Translation not found for some strings.
    --------------------
    "Aurora"
    "Clouds 0"
    "Clouds 1"
    "Clouds 2"
    "ESI"
    "Effective height"
    "Oblateness"
    "Horizon object"
    --------------------


    This will help you to complete your translations and update them when new SE versions/patches are out. Simply copy strings from the log to the localization script and append them with translations. If you make completely new translation, copy and rename the file rus-gui.cfg - it have most complete list of text strings to the date (because Russian is my native language, and I always keep Russian localization updated).

    Please check your translations in the SpaceEnigne. Make sure you don't made some strings too long, so they does not disturbs interface and does not overlap each other. If you don't know what some string or abbreviation means, ask it in this thread.

    It is possible what in SE update some strings being deleted or changed. Your translation should be updated to remove or change them. You will see the following message in the log:

    Code

    WARNING: loc.SetLocalization(): Unknown translation strings found. Possible reasons:
    Obsolete translations (they should be removed from the localization file).
    Duplicated translations (search thought the localization file for duplicates).
    A lot of these strings may indicate a syntax error in the localization file.
    Swapped language may indicate an English string with missing translation for it.
    --------------------
    "Video capture with GUI"  "Video-Aufnahme mit GUI"
    "Video capture without GUI"  "Video-Aufnahme ohne GUI"
    --------------------


    The other possible reasons of this message is duplicated translations or syntax error (in most cases, missing quote "). Please check the log each time and make your localization free of error messages. Only in this case it could be considered as "complete".

    The font texture with configuration script

    WinXXXX-font.png
    WinXXXX.cfg

    Default installation of SpaceEngine includes 4 font textures, which represents Windows-1250 (Central and Eastern Europe), Windows-1251 (Cyrillic), Windows-1252 (Western Europe), and Windows-1254 (Turkish) code pages.



    If your language uses one of these code pages, all you need is just link to them in your localization script:

    Code

    FontConfig    "win1252.cfg"
    FontTexture    "win1252-font.*"


    Otherwise you need to create your own texture and link it in the your localization script.



    The main menu texture

    loc-menu.png

    This is an optional texture, if it is not present, SE will use the default English texture eng-menu.png. However, if you want translate the main menu, here the link to the Photoshop PSD file:

    SE 0.97 main menu texture

    Also, you should install the font ft40_Roman.ttf, if you haven't it (just double-click on the file and click "Install"). Open the Photoshop or GIMP after installing the font!

    ft40 Roman font

    In Photoshop, click on the Slice tool - it helps to distinguish the cells of each GUI "button". Or create it manually by dividing the texture by 16 x 4 cells.

    Each "button", except SpaceEngine logo and planet arc, is a text layer, that can be edited with text editor tool. Make sure text strings fits into their cells, except for 4 bottom cells "Export skybox", "Export system", "Export planet", and "Edit planet" - they are supposed to be 1,5 cells in width (look in the spoiler below).



    After editing, save the texture in the color PNG format. Save the PSD file too, it can be useful in the future, for example if SpaceEngine logo gets changed or new menu entries added.

    The in-game wiki database script

    loc-db.cfg

    This is a database file for the built-in Wiki system. If the file is not introduced, Wiki will be empty. The file can be created by SpaceEngine itself, when user adds a description for some planet or other object. The format of this script may be changed significantly in the future.

    This database can be used to make a short descriptions in your language of some known objects like Solar System planets and moons, stars, galaxies etc. The script consists of several entries of this format:

    Code

    RObject
    {
                    LocName "Chiron"
                    Name    "Chiron"
                    Parent  "Sol"
                    Pioneer "Charles T. Kowal"
                    Date    "1977.10.18"
                    Descr   "[big]Chiron[/big]

    Chiron was the first object to be identified as a centaur, a class of bodies that orbit the Sun between the orbits of Jupiter and Neptune. It has a very eccentric orbit that takes it from inside the orbit of Saturn to past the perihelion distance of Uranus. Its size is uncertain, but the most recent estimates yield a diameter of around 230 km. Its rotation period is 5[hour]55[min]04[sec]13. Chiron has been observed to have comet-like behavior, developing a coma and a tail as it nears perihelion. Like all centaurs, Chrion will eventually move into an orbit that will place it into a different category of objects, likely becoming a short period comet."
    }

    PObject
    {
                                LocName "Pelua"
                                Name    "RS 8403-240-5-18822-162 A4"
                                Parent  "RS 8403-240-5-18822-162 A"
                                Pioneer "SpaceEngineer"
                                Date    "2012.09.03 08:02:17.26"
                                Descr   "Pelua - the fourth planet of the main component of a binary star RS 8403-240-5-18822-162, third the diameter and mass of Earth-like planets of this system. The planet has a relatively dense atmosphere and oceans of liquid water, but signs of life have not been found. It has five large moons, causing alternating strong tides in the oceans, as well as violent volcanic activity.
    Pelua is interesting place due to its size and mass, very close to the Earth's, so its surface gravity is only 2% higher than the Earth's. Thus it can be considered as a good candidate for colonization. However, the cool climate, the thin atmosphere (half of Earth's), tectonic activity, and oceans, saturated with salts of a phosphoric acid, is a serious obstacle to the mass colonization and full terraforming."
    }


    RObject or PObject - an header of the database entry, for real (catalog) object and procedural object respectively. Different designations is used to distinguish objects in the Export / Import Wiki menus.
    LocName "Pelua" - a name of the object in your language, or name given to the object by its discoverer in the game.
    Name "RS 8403-240-5-18822-162 A4" - internal (or catalog) name of the object.
    Parent "RS 8403-240-5-18822-162 A" - internal (or catalog) name of the object's parent, if it exist.
    Pioneer "SpaceEngineer" - name of the player/discoverer.
    Date "2012.09.03 08:02:17.26" - date of discovery.
    Descr "Pelua - the fourth planet..." - description of the object. New lines and specital BB-like codes allowed.

    Description is a not very long text shown in the Wiki window. It should be enclosed in the simple quotes " ", and allows a new lines inside them. To use quotes inside the description, use angular quotes: «Mariner-4». Description allows using of the BB codes, like on this forum (type them without spaces).



    Links to the files

    SE 0.97 font textures
    SE 0.97 main menu texture
    ft40 Roman font
    Attachments: 6310036.png(8Kb) · 4708327.png(9Kb) · 6946301.png(8Kb) · 9696198.png(123Kb) · 5533493.png(88Kb) · 9793489.png(8Kb)
  •  
    SpaceEngineerDate: Wednesday, 22.05.2013, 21:25 | Message # 2
    Author of Space Engine
    Group: Administrators
    Russian Federation
    Messages: 4799
    Status: Offline
    List of new strings introduced for the next version 0.9.7.1. I will update it during my work.



    Changed old lines
    "Screenshot without HUD"--> changed to "Screenshot without GUI"
    "Screenshot with HUD"--> changed to "Screenshot with GUI"

    New lines
    "Creating planetary system"
    "Video capture without GUI"
    "Video capture with GUI"
    "Recording frame"
    "auto"
    "Display"
    "Apply"
    "Window mode"
    "Fullscreen"
    "Windowed"
    "Custom display resolution"
    "Window size"
    "Vertical synchronization"
    "Anisotropy level"
    "Back"
    "Night side lights"
    "Astronaut"
    "Build menu"
    "Build"
    "Destroy"
    "App. mag"--- Translated string must be not longer than original English!
    "Abs. mag"--- Translated string must be not longer than original English!
    "Lumin."--- Translated string must be not longer than original English!
    "constructed"
    "destroyed"
    "Surf/sea altitude" --- Translated string must be not longer than original English!

    "Unknown"
    "Discovery method" --- Translated string must be not longer than original English!
    "Radial velocity"
    "Transit"
    "Astrometry"
    "Microlensing"
    "Direct imaging"
    "Transit timing variations"
    "Transit duration variations"
    "Orbital light variations"
    "Eclipsing binary timing"
    "Variable star timing"
    "Pulsar timing"
    "Polarimetry"
    "Auroral radio emission"
    "Interferometry"

    "Organic"
    "Exotic"
    "unicellular"
    "multicellular"
    "subglacial"
    "marine"
    "terrestrial"
    "floaters"

    "Planetarium"
    "Single player"
    "Multiplayer"
    "Editor"
    "Edit planet"

    "Sound"
    "Sound effects"
    "Music"
    "No repeat"
    "Repeat track"
    "Repeat playlist"
    "Play in order"
    "Play random"
    "Context playing"




    "Apocentric distance"
    "Pericenter"
    "Apocenter"

    "Hill sphere radius" --- info
    "Influence sphere radius" --- [url=http://en.wikipedia.org/wiki/Sphere_of_influence_(astrodynamics)]info[/url]

    "Hyperjump"
    "Mode"
    "Off"
    "Orb" --- short forb of "Orbital"
    "Hor" --- short forb of "Horizontal"
    "Prograde"
    "Retrograde"
    "Radial"
    "Antiradial"
    "Normal Up"
    "Normal Down"
    "Horizon"
    "Center on ship"
    "Kill rotation"
    "Sync velocity" --- short form of "Synchronize velocity"
    "Sync rotation" --- short form of "Synchronize rotation"
    "Avia mode"
    "Space mode"
    "Aviation"
    "Thrusters disabled"
    "Thrusters enabled"
    "Elevation" --- Height above surface
    "Altitude" --- Height above sea level
    "Sound speed"
    "Mach"
    "Air density"
    "Air temperature"
    "Air pressure"
    "Dynamic pressure" --- info
    "Air velocity" --- velocity relative air
    "Surf velocity" --- velocity relative planetary surface
    "Grav accel" --- acceleration caused by gravity forces
    "Aero accel" --- acceleration caused by aerodynamic forces
    "Thrust" --- acceleration caused by engines thrust
    "Total accel" --- total acceleration caused by all forces
    "g Force"
    "Angular velocity"
    "Angular accel"
    "Attack angle" --- info
    "Sideslip angle" --- info --- correct typo!
    "Elevator" --- [url=http://en.wikipedia.org/wiki/Elevator_(aircraft)]info[/url]
    "Rudder" --- info
    "Ailerons" --- info
    "Flaps" --- [url=http://en.wikipedia.org/wiki/Flap_(aircraft)]info[/url]
    "Orbital parameters"
    "Planet radius"
    "Atmo height"
    "Main engines"
    "Hover engines"
    "Thrusters"
    "Cheater!"




    "Add to locations"
    "Turn CW-CCW"
    "Turn left-right"
    "Turn up-down"
    "Common controls"
    "Free camera"
    "Ship in atmosphere"
    "Ship in space"
    "Keyboard"
    "Mouse"
    "Joystick"
    "Mouse axis X"
    "Mouse axis Y"
    "Mouse axis Z"
    "Joystick axis X"
    "Joystick axis Y"
    "Joystick axis Z"
    "Keyboard sensitivity"
    "Mouse sensitivity"
    "Joystick sensitivity"
    "Inverted"
    "Not inverted"




    English is a default SE language that does not need a localization files (strings are embedded into SpaceEngine.exe). Russian is my native language, so this localization is always up to date.

    Green localizations are up to date.
    Red localizations must be updated.

    [eng] English
    [cro] Croatian
    [cze] Czech
    [esp] Spanish
    [fin] Finnish
    [fra] French
    [ger] German
    [ita] Italian
    [ned] Nederland
    [pol] Polish
    [ptbr] Brazilian Portuguese
    [ptpt] Portugal Portuguese
    [ro] Romanian
    [rus] Russian
    [sk] Slovak
    [swe] Swedish
    [tur] Turkish





     
    Antza2Date: Tuesday, 04.06.2013, 19:54 | Message # 3
    World Builder
    Group: Global Moderators
    Finland
    Messages: 1049
    Status: Offline
    Update to the finnish translation.
    Attachments: fin-gui.cfg(26Kb)





    Go to antza2.deviantart.com for cool photos!
     
    FrostbreathDate: Tuesday, 04.06.2013, 20:57 | Message # 4
    Space Pilot
    Group: Translators
    Netherlands
    Messages: 118
    Status: Offline
    Updated Dutch translation:

    V1.2b





    Amateur astronomer. Owner of a Celestron C8 telescope and, of course, Space Engine. Translator for Dutch.
     
    SpaceEngineerDate: Tuesday, 04.06.2013, 22:26 | Message # 5
    Author of Space Engine
    Group: Administrators
    Russian Federation
    Messages: 4799
    Status: Offline
    Antza2, Frostbreath, are you update locs for 0.9.7.1?




     
    Antza2Date: Tuesday, 04.06.2013, 22:28 | Message # 6
    World Builder
    Group: Global Moderators
    Finland
    Messages: 1049
    Status: Offline
    Quote (SpaceEngineer)
    Antza2, Frostbreath, are you update locs for 0.9.7.1?

    I added the strings you mentioned in the OP, if that's what you mean.
    Also, fixed a minor error.

    Attachments: 5509518.cfg(26Kb)





    Go to antza2.deviantart.com for cool photos!
     
    VoekoevakaDate: Tuesday, 04.06.2013, 22:46 | Message # 7
    World Builder
    Group: SE team
    France
    Messages: 1016
    Status: Offline
    Updated for French.
    Attachments: fra-gui.cfg(29Kb)





    Want some music of mine ? Please go here !

     
    FrostbreathDate: Wednesday, 05.06.2013, 06:36 | Message # 8
    Space Pilot
    Group: Translators
    Netherlands
    Messages: 118
    Status: Offline
    Quote (SpaceEngineer)
    Antza2, Frostbreath, are you update locs for 0.9.7.1?


    Of course, otherwise I'd posted it in my own topic. smile





    Amateur astronomer. Owner of a Celestron C8 telescope and, of course, Space Engine. Translator for Dutch.
     
    TotyDate: Wednesday, 05.06.2013, 17:31 | Message # 9
    Explorer
    Group: SE team
    Spain
    Messages: 158
    Status: Offline
    Updated spanish translation.
    Attachments: esp-gui.cfg(27Kb)


    Edited by Toty - Tuesday, 18.06.2013, 08:47
     
    SalvoDate: Wednesday, 05.06.2013, 19:28 | Message # 10
    Star Engineer
    Group: Local Moderators
    Italy
    Messages: 1400
    Status: Offline
    Italian translation updated too
    Attachments: ita-gui.cfg(25Kb)





    The universe is not required to be in perfect harmony with human ambition.

    CPU: Intel Core i7 4770 GPU: ASUS Radeon R9 270 RAM: 8 GBs

    (still don't know why everyone is doing this...)
     
    Fireinthehole-Date: Sunday, 16.06.2013, 19:50 | Message # 11
    Pioneer
    Group: Translators
    Sweden
    Messages: 365
    Status: Offline
    Hm, I translated the gui into Swedish but when I tested it, most of the words I translated were still in English. Does anybody know what could have gone wrong? unsure

    I'll attach the file if someone wants to have a look at it.

    Attachments: swe-gui.cfg(25Kb)





    Love Space Engine!
     
    HarbingerDawnDate: Sunday, 16.06.2013, 20:09 | Message # 12
    Cosmic Curator
    Group: Administrators
    United States
    Messages: 8714
    Status: Offline
    Quote (Fireinthehole)
    Does anybody know what could have gone wrong?

    You probably missed a quote mark " somewhere.





    All forum users, please read this!
    My SE mods and addons
    Phenom II X6 1090T 3.2 GHz, 16 GB DDR3 RAM, GTX 970 3584 MB VRAM
     
    Fireinthehole-Date: Sunday, 16.06.2013, 20:17 | Message # 13
    Pioneer
    Group: Translators
    Sweden
    Messages: 365
    Status: Offline
    Quote (HarbingerDawn)
    You probably missed a quote mark " somewhere.

    If one quote mark is missed, does all code below it turn untranslated?





    Love Space Engine!
     
    HarbingerDawnDate: Sunday, 16.06.2013, 20:38 | Message # 14
    Cosmic Curator
    Group: Administrators
    United States
    Messages: 8714
    Status: Offline
    Quote (Fireinthehole)
    does all code below it turn untranslated?

    I'm pretty sure it does.





    All forum users, please read this!
    My SE mods and addons
    Phenom II X6 1090T 3.2 GHz, 16 GB DDR3 RAM, GTX 970 3584 MB VRAM
     
    Fireinthehole-Date: Sunday, 16.06.2013, 22:30 | Message # 15
    Pioneer
    Group: Translators
    Sweden
    Messages: 365
    Status: Offline
    Allright I checked the quote marks and found that one was missing, but still no change. sad




    Love Space Engine!
     
    Forum » SpaceEngine » Mods and Addons » MOD - Creating localizations 0.97 (Translations into another language)
    Page 1 of 131231213»
    Search: