Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 17

Author Topic: Dwarf Fortress localization patch  (Read 112618 times)

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Dwarf Fortress localization patch
« on: May 03, 2012, 01:42:10 pm »

Greetings!
For a few months I'm working on a utility that replaces strings hardcoded in Dwarf Fortress.exe with ones it get from an external file, ie. it can be used to translate Dwarf Fortress to some language other than English (in particular we are working on Russian translation of DF). If someone interested I will provide additional info.
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #1 on: May 03, 2012, 01:48:48 pm »

Wow i'd like to see Russian version of DF. Though grammar would be a real pain. Maybe i'd be able to make my wife ply it at last:)
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #2 on: May 03, 2012, 02:29:56 pm »

You are right. Because of grammar differences between English and Russian, almost every report looks improperly. At least we can correctly translate whole phrases in menus, dialogs etc. Another problem is that the "Thoughts and Prefences" screen still can't be output with TTF font, so there's no a simple solution how to use cyrillic there.

There's some screenshots:
Spoiler (click to show/hide)
« Last Edit: April 28, 2013, 11:52:45 am by insolor »
Logged

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #3 on: May 03, 2012, 02:33:43 pm »

I know this might not be on your list of targets, but Tagalog localization might be possible? In case there might be that small niche of players who speak that primarily. Just placing it here as a suggestion.

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #4 on: May 03, 2012, 02:44:45 pm »

I know this might not be on your list of targets, but Tagalog localization might be possible? In case there might be that small niche of players who speak that primarily. Just placing it here as a suggestion.
Wikipedia says that Tagalog currently uses Latin writing system, so it won't be very difficult to make localization. Of course translation of text strings is up to you and anyone interested, I can only provide the utilty program.
« Last Edit: May 03, 2012, 02:46:25 pm by insolor »
Logged

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #5 on: May 03, 2012, 02:57:02 pm »

Ah, good, I'm willing to help out on translation on various languages. I'll be using various translators and dictionaries, but this is a good thing to have for those niche players who can't speak English too well.

AVE

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #6 on: May 03, 2012, 03:01:42 pm »

Binary l10n is always a pain, especially with languages whose word sizes differ when translated. It is an extremely hard work, and not always successful. Be strong and don't give up!

BTW, binary patches (and partial disassembly) might require Toady One permission. Just sayin'.
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #7 on: May 03, 2012, 04:59:44 pm »

Binary l10n is always a pain, especially with languages whose word sizes differ when translated.
If memory serves me, about 25 percent text strings translated in Russian are much longer then corresponding original strings. That was rather tricky, but I've solved the problem.

BTW, binary patches (and partial disassembly) might require Toady One permission. Just sayin'.
I've just sent him a letter e-mail.
« Last Edit: May 04, 2012, 02:53:11 am by insolor »
Logged

teloft

  • Bay Watcher
  • We found the zirilid stream
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #8 on: November 05, 2012, 04:42:00 pm »

Hey, what's is new with the language translations stuff?

I saw this tread on the:
http://www.bay12forums.com/smf/index.php?topic=60742.30


What I like is some way to translate DF to my local Icelandic so that I can let the little people play the game. But there is some problems with the files that are locked.
Logged
We found the zirilid stream

muange

  • Escaped Lunatic
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #9 on: March 02, 2013, 02:32:08 am »

so, what is that 'utillity'?
if you finished making that utility, can u send it to me?
i'm trying to translate DF to other languge
« Last Edit: March 02, 2013, 02:46:51 am by muange »
Logged

Mesa

  • Bay Watcher
  • Call me River.
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #10 on: March 03, 2013, 10:15:00 am »

I could do a Polish localization of Dwarf Fortress, maybe even single-handily, BUT BOY, it would be the worst translation ever.
Polish is a very, VERY context-heavy language (every single word has at least 7 or so forms depending on context of the sentence)

Let me give you an example (COMRADES, BEWARE!):
"góra" (pronunciation) ("mountain" and "up").
"To jest góra." ("This is a mountain.")
"Tu nie ma góry." ("There is no mountain here.")
"On jest na górze." ("He is on the mountain." OR "He is upstairs.")

Translating it to make it work in Dwarf Fortress is crazily hard, if not impossible.
While Dwarf Fortress IS hard by definition, one would need to rewrite most of the game's code to make it work - and it probably wouldn't be worth the hassle.

That's the problem with most games that use pseudo-random generation (of text).
While Minecraft succeeded at translating the game (but still no proper Polish font is available - there IS a Polish font support, but it's not the Minecraft-style pixelated font), it did so only because of lack of randomly generated text.

Enough of derailing...
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Fortress localization patch
« Reply #11 on: March 03, 2013, 01:29:17 pm »

A while ago I did send the source code of my GUI to someone, and he said the russian masterwork mod is about 50% done... I saw screenshots, it works. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #12 on: March 04, 2013, 10:33:27 am »

The utility is mostly completed since last August. But currently it needs some changes to support languages other then Russian. I am going to do latin version after a couple weeks, and then add support for custom codepages (currently the utility has only cyrillic codepage support).

As for noted localization problems, probably most of the East-European languages will have the same problems with declination. However for now most of menus and static inscriptions are translated more or less adequately.

The problematic places are:
  • Thoughts and prefences screeen
  • Announcements and reports screens
  • Legeds mode messages
  • some other places

Furthermore, order of words in names of various objects must be reversed to avoid necessity of declination, eg. "X of steel" ("ботинки из стали", "шлем из стали", "кольчуга из стали" еtc.) instead of "steel X" ("стальные ботинки", "стальной шлем", "стальная кольчуга" etc.)
Currently this problem is nearly impossible to overcome.

A while ago I did send the source code of my GUI to someone, and he said the russian masterwork mod is about 50% done... I saw screenshots, it works. :)
As far as I know russian masterwork mod uses my localization patch. Someone I know under Rian Ashes nickname said he is going to translate the masterwork mod :)
Moreover, we already translated Dwarf Therapist and made Soundsence to understand russian messages (thanks to Soundsence developer).
« Last Edit: March 04, 2013, 10:39:55 pm by insolor »
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #13 on: April 12, 2013, 05:42:14 am »

Quote from: PM
Hey, found your thread on the forums, I'm interested on making a Lithuanian (at least partial) localization. Any chance I could get my hands on your program? Did you add Latin characters yet?
It's better to say, "did you remove cyrillic characters?" :) It's not so hard to do. The greater problem for me is how to name the new utility? For now it is called dfrus, it's obvious that the universal utility needs another name.
Anyway I am going to show you the program this weekend. Trust me ;)
« Last Edit: April 12, 2013, 05:48:14 am by insolor »
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #14 on: April 14, 2013, 03:53:07 am »

So, there is the utility: https://bitbucket.org/dfint/df-i18n/downloads/df-i18n.zip
The package contains two files: dfint.exe and template.lng, the utility itself and the template of language file appropriately.
You must rename template.lng as you wish, then change it's first line.
The first line contains the name of a copy of the Dwarf Fortress executable, that will be patched. The original Dwarf Fortress.exe won't be changed.
The remaining part of the language file looks like:
Code: [Select]
|Activity|Activity|
|Training Session|Training Session|
|Activity Event|Activity Event|
|Go to Combat Training|Go to Combat Training|
|Organize Combat Training|Organize Combat Training|
|Lead Combat Training|Lead Combat Training|
|Wait for Combat Training|Wait for Combat Training|
...

To translate some string you must change the text after the second | , i.e.:
Code: [Select]
|Activity event|Ytivitca tneve| some comment hereBe careful with lines that ends with ==. The length of translation in that lines must be the same as the length of the original string to prevent the game from crash.

To apply your translation to the DF, place the dfint.exe and your .lng file to the directory that contains Dwarf Fortress.exe and then execute dfint.exe. The changed DF executable with the name from the first line of your .lng file will be appeared.
« Last Edit: April 20, 2013, 09:35:37 am by insolor »
Logged
Pages: [1] 2 3 ... 17