• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

WIP Spanish translation

Last time I tried it, that translation framework didn't work and broke the game badly. But @Maximus has been working on a Russian translation which does appear to work. It will be in the next update. That may provide a basis for a Spanish translation as well. (The Russian translation does properly use "RESOURCE\INI\TEXTS\RUSSIAN" and "PROGRAM\DIALOGS\RUSSIAN", leaving the "ENGLISH" versions in English, so that you can choose to play in English or Russian.)

It did work (mostly) in my game, so my guess is there were just a few errors here and there to iron out. But finding them is the tricky bit.
 
Unfortunately, no. This is because @Xianco, instead of creating "PROGRAM\DIALOGS\SPANISH" and "RESOURCE\INI\TEXTS\SPANISH", has overwritten "PROGRAM\DIALOGS\ENGLISH" and "RESOURCE\INI\TEXTS\ENGLISH" with the Spanish translations. If I include these files, anyone wanting to play the game in English will instead see Spanish text!

Exact!! This translation can not be included in the mod because it overwrites the texts in English and because it is not a professional translation either. This translation can only be used to patch the game by copying, pasting and overwriting as usual in many games on which it is usually added a functional and provisional translation (nothing professional) with the sole purpose of eliminating the language barrier for many players that would otherwise leave the game soon after starting.

At first, my goal was only to translate the menus, but little by little I felt the need to translate the dialogue texts of some npc and when I found the work of Homo Erectus, I realized that a considerable part of the work was already done . Only had to update slightly the files created by Homo Erectus to square them in the new update of the mod and add the rest without haste, while playing to see the changes. Then came the problems and my involvement was greater. But today I only have to correct minor errors and make a complete revision focused on the grammatical aspect to give more meaning to some files already translated. Fortunately, today's online translators are much more powerful than those of 4 years ago.
 
Thanks for picking up the work. I came to the conclusion that it was impossible for me to keep pace with the mod development to offer an up to date translation that was also to the level of quality I wanted (I do translate line by line, not using automatic translators, and I'd recommend you do the same. I understand it's a huge commitment of time and effort, but there are no workarounds for a quality translation, and autotranslators mess things up in ways that are more trouble to fix than the time it would cost to translate manually from scratch), but I'm glad to see someone else is up to the task!

If you're using my files as a base, there should be no trouble with special characters like ñ and accents, they're perfectly compatible with the game engine, provided the files are codified in ANSI, which can be done with two clicks in notepad++. My files also use the translation framework which allows the translation to function alongside the English version.

Your files are perfect and they are also the basis that impel me to continue your work, but when I started working on your project, I did not know the difficulties that awaited me and my purpose was not even to finish this translation in full, but to partially translate it to understand the game part focused only on the free mode. If it is not for the New Horizon mod and for your work, in the long term I would not even have bothered to play it because of the difficulty of the language.

In your work I have seen that you have also corrected the misspellings generated by the format change, such as Ñ and accents. I have neither the aspiration nor the patience to stop in so much detail. If after all these years nobody has made a complete translation of this game, it is only due to the difficulty and effort of finishing something that requires a lot of commitment. So from the beginning I did not want to do anything professional, and in fact, there are many games that offer unprofessional mods and language patches, but in short functional accounts.

By the way, I take this opportunity to update the link of the translation with the revision, in case someone wants it.

MEGA
 
Last edited:
I have neither the aspiration nor the patience to stop in so much detail. If after all these years nobody has made a complete translation of this game, it is only due to the difficulty and effort of finishing something that requires a lot of commitment.
True and fair enough.
Well, if you can bring @Homo eructus' work work another step forward now, perhaps somebody else will come along one day and bring it further still.
Rome wasn't built in a day either and certainly the New Horizons mod is the cumulative effort of a LOT of people over a LOT of years. :onya
 
@Xianco:
In "Father Jerald_dialog.h":
Code:
"I'm sorry, #sFather#, but I have to go.",
"Of course, my #schild#. How much do you want to give?",
"I am sorry, #sFather#, but I can't make a donation just now.",
As @Pieter Boelen says, the parts between the '#' are translated by the preprocessor system. What is between the '#' should match a similar tag in "Father Jerald_dialog.c", where the tag is defined:
Code:
Preprocessor_Add("Father", GetMyFirstNames(CharacterFromID("Father Bernard"), false));
This is wrong, it should be 'CharacterFromID("Father Jerald")'. I'll need to correct that for the next update. But the point is, this line defines the tag "Father" to be the priest's first name. Where '#sFather#' appears in the dialog text, it will be replaced by the priest's first name, which will be "Father" because he is an English priest. The preprocessing will only work if the tag is the same in both "Father Jerald_dialog.c" and "Father Jerald_dialog.h".

Priests' titles probably should not be translated anyway. The English language version of the game calls the Spanish priest in San Juan "Padre Domingues". So the Spanish language version should call the English priest in Bridgetown "Father Jerald". And both versions should call the French priest in St. Pierre "Pater Jourdain".

And '#schild#' probably won't work because "Father Jerald_dialog.c" defines "child":
Code:
   if (PChar.sex == "man") Preprocessor_Add("child", XI_ConvertString("son"));
   else Preprocessor_Add("child", XI_ConvertString("child"));
You have an outdated version of "RESOURCE\INI\TEXTS\ENGLISH\common.ini", which is what 'XI_ConvertString' uses for its translations. Your version does not contain "child", though it does contain "son". So a male character talking to the priest will be properly called "hijo" but a female character probably won't be called anything.

@Pieter Boelen: that piece of code sets up preprocessed tags used by the questbooks. It's needed because in "Early Explorers", Father Bernard is not Father Bernard because Port Royale is not English, it's Spanish. So he's given a random Spanish name, then his first name is overwritten in "Periods.c" to be "Padre". The same applies to Fathers Jerald and Gareth because in "Early Explorers" Barbados is Portuguese.

The problem of using the automatic translator is precisely that, which I then have to solve one by one all translation errors that alter the codes, signs and labels that call other files. Luckily, not all codes are altered by the automatic translator and that is practically solved.
 
Exact!! This translation can not be included in the mod because it overwrites the texts in English and because it is not a professional translation either. This translation can only be used to patch the game by copying, pasting and overwriting as usual in many games on which it is usually added a functional and provisional translation (nothing professional) with the sole purpose of eliminating the language barrier for many players that would otherwise leave the game soon after starting.
The point is, it could be included if the files were in the proper folders and an option to choose Spanish included in the game interface.

I'm hoping to put out a new update at the end of this week, including @Maximus' Russian translation. That does allow an option in the interface to choose Russian, and has its translation files in "RUSSIAN" folders. Once that update is available, see if you can make the Spanish translation do the same.
 
The point is, it could be included if the files were in the proper folders and an option to choose Spanish included in the game interface.

I'm hoping to put out a new update at the end of this week, including @Maximus' Russian translation. That does allow an option in the interface to choose Russian, and has its translation files in "RUSSIAN" folders. Once that update is available, see if you can make the Spanish translation do the same.

True, the names of characters, ships and objects that are linked to other files, can not be altered because it would break precisely that link between a file and another, which causes certain characters and missions do not work properly. That I have clear and that is the reason why I am doing the review looking for all the names altered by the translator, retain their original name (in English). When I started working on this translation I had already realized that great detail and luckily I was correcting it while translating the files. The fact that the names must be in English does not represent a language obstacle for the player who does not know English.

I do not know if something escapes me, but I think that to include any additional translation in the game, it is not necessary to translate and modify the C files. Not at least while preserving the proper names of characters, ships and perhaps certain objects in the files H and txt.

When the mod is updated with the new language in Russian, it will be easier to understand what the possibilities of adding any other language will be. Once this Russian is added you can create a similar structure of folders with H and txt files without touching the C files and without changing the proper names. Then I think it would be necessary to simply change the name of the language folder by adding the new one in the language configuration link within the game itself.

It is possible that I do not know what I am talking about. In the worst case, there is always the possibility of leaving everything as it is improving little by little the translation in Spanish and that the person overwriting one language over another.

Out of curiosity, is there a link to know what will be the changes of the new update you are developing for New Horizons?
 
Last edited:
I do not know if something escapes me, but I think that to include any additional translation in the game, it is not necessary to translate and modify the C files. Not at least while preserving the proper names of characters, ships and perhaps certain objects in the files H and txt.
Exactly. The .c files don't change between languages. Character and ship names are not normally translated, e.g. Nathaniel Hawk is the same in English and Spanish, as is Lucas da Saldanha. Santissima Trinidad is not translated into English and Golden Hind is not translated into Spanish. But all of those do need to be translated into Russian because it uses a completely different alphabet, so when you look for the Russian translation code and files, you'll find some things that you won't need to do for Spanish. Russian needs its own version of "PROGRAM\Characters\Characters_names.c" but Spanish does not.

So, for example, there is "RESOURCE\INI\TEXTS\ENGLISH\common.ini", which is used for a wide variety of things. The first line of translation is:
Code:
string = titleShipTuning,"UPGRADE SHIP"
Somewhere in code will refer to "titleShipTuning". Playing in English, what you will see in the game is "UPGRADE SHIP". And there is "RESOURCE\INI\TEXTS\RUSSIAN\common.ini", where the same line is:
Code:
string = titleShipTuning, "ÓËÓ×ØÅÍÈÅ ÊÎÐÀÁËß"
The strange characters are because Russian letters don't appear properly here, but you get the idea - if you're playing in Russian, what you will see in the game is the Russian translation. What you want, then, is "RESOURCE\INI\TEXTS\SPANISH\common.ini", where that line will be:
Code:
string = titleShipTuning, "<whatever is Spanish for 'UPGRADE SHIP'>"

When the mod is updated with the new language in Russian, it will be easier to understand what the possibilities of adding any other language will be. Once this Russian is added you can create a similar structure of folders with H and txt files without touching the C files and without changing the proper names. Then I think it would be necessary to simply change the name of the language folder by adding the new one in the language configuration link within the game itself.
Yes, if you can find out how the interface tells the game which language the player has chosen, then the game will automatically look for the correct language files.

Out of curiosity, is there a link to know what will be the changes of the new update you are developing for New Horizons?

Not yet, because I have still to do a comparison between the update as it is now on my computer and the update which is currently available for download. That is the one from 17th May; both the update and the list of fixes can be found here:
Mod Release - Build 14 Beta [Last Update: 17 May 2019]
Watch that thread; the title will change and I'll announce that the new update is available, from the same place.
 
Character and ship names are not normally translated, e.g. Nathaniel Hawk is the same in English and Spanish, as is Lucas da Saldanha. Santissima Trinidad is not translated into English and Golden Hind is not translated into Spanish.
Well, If we're being picky, it's Santísima Trinidad in Spanish;). And Lucas Da Saldanha, although the character is Spanish, is actually a Portuguese name. The Spanish version would be "de Saldaña", but I never tried to open that can of worms of renaming quest characters.

There are some character names that would need translation, characters that are not given a proper name, but just a descriptive title, rank or profession. I think my files contain a characters_names.c, but it may be outdated if new characters have been added in the last couple of years.
 
Descriptive names certainly need to be translated, e.g. the Indians in "Ardent", which is why their names have been in the storyline's "characters_names.txt" file for some time. Ranks might be - "captain", the default title for a ship's commander, would be translated. On the other hand, I'd expect a British officer to call his Spanish counterpart "Capitán de Fragata Ramirez", not "Post Captain Ramirez", for example.

"characters_names.c" is not for specific characters, though I often refer to it when picking names for characters. Its main purpose is to supply random names to random NPC's spawned by the game, so each nation has a selection of names - in fact, I believe it was you who rewrote the Spanish section. ;) Russian needs its own "characters_names.c" because those random NPC names need to be displayed using the Russian alphabet. Spanish names already use accented characters in that file, as do names in other languages.

What you will need is "RESOURCE\INI\TEXTS\SPANISH\characters_names.txt", as well as storyline-specific "characters_names.txt" in the relevant storyline sub-folders. And any such files you have are about to become updated because of the Russian translation, which requires that all names be in one or other of these files so that they, too, can be translated into the Russian alphabet. So even names which would not normally be translated, and which weren't in the files before, are included in the latest update.
 
Here I leave the complete revision of the New Horizonts translation. Fixed the errors in the codes and updated the common ini files.

For my part I finished the translation developed in approximately 95% (less than I thought). When the update comes out I will see if I can update the modified or added files.

MEGA

If you find an error, it will be resolved as soon as possible.
 
Here I leave the complete revision of the New Horizonts translation. Fixed the errors in the codes and updated the common ini files.

For my part I finished the translation developed in approximately 95% (less than I thought). When the update comes out I will see if I can update the modified or added files.
The update was released on Friday. ;)
Mod Release - Build 14 Beta [Last Update: 28 June 2019]

If you can arrange for your translations to go into "SPANISH" folders rather than "ENGLISH", and if you can figure out how to make the interface offer Spanish as an option (see if you can find how @Maximus did it for Russian), I can add your Spanish translation to the next update.
 
The update was released on Friday. ;)
Mod Release - Build 14 Beta [Last Update: 28 June 2019]

If you can arrange for your translations to go into "SPANISH" folders rather than "ENGLISH", and if you can figure out how to make the interface offer Spanish as an option (see if you can find how @Maximus did it for Russian), I can add your Spanish translation to the next update.
A simple view seems to be easy to make the interface menu show new languages, but unfortunately I can not find a way to do it. I have searched the external files for the translation because I think there has to be a link between the external configuration and the translation folder itself. In any case, now I have work ahead translating and updating the common file and the rest of the files are in the new update. This will take me a few weeks and until it's all over, maybe you can talk to Maximus to ask him how to include the package in Spanish in the game interface.

In any case, now I prefer to work for a while in the translation so that all the files in DIALOGUES are completely clean of inverted question marks and some words (few) that have been translated into strange abbreviations (Nothing that hinders the comprehension of the dialogues) which bother the eye and can be easily removed.

By the way, you did a great job in this new update. It is impressive to see the result of a mod that has managed to transform a fairly limited game into a great game.
 
Isn't it a simple matter of adding the required "SPANISH" folders and files and the game will recognize it by itself?
 
Not entirely. I tried that - downloaded @Xianco's file, and renamed the "ENGLISH" folders to "SPANISH". ("RESOURCE\INI\ENGLISH" should be "RESOURCE\INI\TEXTS\ENGLISH". Or "RESOURCE\INI\TEXTS\SPANISH". ;)) Then I tried changing languages, and the interface still only gave the choice of English or Russian. After a lot of digging, I found out why. When you try to scroll through the languages, function 'ProcessLanguageRight()' in "PROGRAM\INTERFACE\option_screen.c" checks each language in sequence and quits when it finds one which doesn't exist. The sequence is in "PROGRAM\globals.c":
Code:
#define ILANG_ENG   0
#define ILANG_RUS   1
#define ILANG_FRA   2
#define ILANG_GER   3
#define ILANG_SPA   4
#define ILANG_POL   5
So 'ProcessLanguageRight()' finds English, finds Russian, doesn't find French, quits, and never gets to Spanish.

Obvious solution - change the sequence:
Code:
#define ILANG_ENG   0
#define ILANG_RUS   1
#define ILANG_SPA   2
#define ILANG_FRA   3
#define ILANG_GER   4
#define ILANG_POL   5

The revised "globals.c" is attached. And it works! Well, at least as far as the translating has been done...
options.jpg character_select.jpg malcolm.jpg relations.jpg

There's still a lot of work to be done. For one thing, some of the tutorial questbooks don't show their titles:
questbook1.jpg questbook2.jpg

There are no "PROGRAM\Storyline\<story name>\DIALOGS" files, so all storyline dialog text will still show up in English. "RESOURCE\INI\TEXTS\SPANISH\Storyline" does exist so storyline questbooks might work - I haven't had time to try one, they may have the same problem with titles as the tutorial questbooks. But the various "characters_names.txt" files will need to be expanded to include all character names, even proper names which don't need to be translated - these can simply be copied from the English files.

By the way, see that garbage at the end of the questbook text? You need to put a blank line at the end of the questbook to prevent that.
 

Attachments

  • globals.c
    13.6 KB · Views: 89
Back
Top