• 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

@Pieter Boelen , I have spoken with @Homo eructus by a private conversation, and I decided to help him with his work of translating the game into spanish language, as I am too from spain :) I'm not the greatest modder, but I will be sure to contribute or help him as much as I can.

Welcome aboard! As promised, here's a sample of what I've done so far.
Common.ini and interface_strings.txt could be useful because a lot of main game concepts are in there (ship types, officer jobs, cargo types...), so if they appear again further along, you can match them with what I've already done and avoid having the same thing named differently. The others are randomly picked to give a general idea of the file types. They sure have some typos, spcially as I typed some of them with a busted keyboard (I still find a few every time I check), so feel free to correct any mistake you find and send the files back to me.

PD. Of course in the final version, the folder will be named SPANISH.
 

Attachments

  • ENGLISH.7z
    65.7 KB · Views: 239
@Grey Roger , I have a question about putting genders on male and female characters. Can you explain me how to put that onto the dialog files?

There's also 'Preprocessor_Add(string label, string text)' which does something similar for other text such as dialogs. Have a look at this. Specifically, look at case "node_Rys Bloom_4" in "Laurence Wellman_dialog.c" and line 47 of "Laurence Wellman_dialog.h". Laurence Wellman is the Port Royale port master and you talk to him about Rys Bloom. At the moment he is looking for a worthy man to vouch for Bloom and you ask him if you are a worthy man. With this version, he's looking for someone worthy to vouch for Bloom and you ask if you are a worthy man / woman depending on whether you are in fact a man or woman.

That would help me to do that with the dialog files, as in spanish it's rather difficult to create conversations with separate genders on most of its words.
 
Can you give me an example of exactly what you are trying to do?

The preprocessor method works well enough for having one or two words varying in an otherwise identical sentence for both cases, but if the sentence has to vary too widely depending on whether it's referring to a man or a woman, it may be easier just to have two entirely separate lines of dialog text and make the dialog code choose one of them. Something like:
Code:
if (PChar.sex == "man") dialog.text = DLG_TEXT[21];
else dialog.text = DLG_TEXT[22];
If you're male then the character will say whatever is on line 21 of the dialog, if you're female then the character will use line 22.
 
Well, for example, take a look at this line. It's with Alan Milds, the owner of the shop of Speighstown:

Code:
"Why, forsooth! My dear "

Now, this code, if translated into spanish, can have two variants, depending on the gender of the character, for the word "dear". If the character is male, then it would be "querido", but if it's female, then it would be "querida". Also, the noun "captain" also has gender on spanish, so I don't know if I just put always "Capitán" (For male), or put "Capitán" and "Capitana" (Female). I'm inclined to always use "Capitán" on both genders, but that's something I would like @Homo eructus to answer me.

Also, where I can put that code which you have shown me? In the c. file of the correspondant dialog?
 
And this is the well know problem every translator will face.
And everyone who only speaks 1 language wont get this because they think all other languages are just like english but with other words.

@HellSailor unless you are going to change all dialog files in the game (the code files) what you want can't be done and you either need to be creative with the translation of think up something else.
 
@HellSailor unless you are going to change all dialog files in the game (the code files) what you want can't be done and you either need to be creative with the translation of think up something else.
That is true. But changing dialog files can be done one file at a time.
And if that is done in such a way that the English variants remain operation, then we can include those changes in the main mod to maintain compatibility.
So I would say this is totally possible. Just a lot of work.
 
thinking about it a bit more.
All text still goes trough a processor right?
So you could use a define variable, like #captain for example.
And at the start of the game have it set to the right value depending on the gender ...
 
And at the start of the game have it set to the right value depending on the gender ...
Absolutely possible. That is how all the period-dependent town and island names are handled. :yes
 
Well, for example, take a look at this line. It's with Alan Milds, the owner of the shop of Speighstown:

Code:
"Why, forsooth! My dear "

Now, this code, if translated into spanish, can have two variants, depending on the gender of the character, for the word "dear". If the character is male, then it would be "querido", but if it's female, then it would be "querida". Also, the noun "captain" also has gender on spanish, so I don't know if I just put always "Capitán" (For male), or put "Capitán" and "Capitana" (Female). I'm inclined to always use "Capitán" on both genders, but that's something I would like @Homo eructus to answer me.
"My dear " is only part of the sentence. The relevant line in "Alan Milds_dialog.c", buried inside a big mess of comments, is:
Code:
d.Text = RandPhrase(DLG_TEXT[8] + GetMyAddressForm(NPChar, PChar, ADDR_IMPTITLE, false, false) + DLG_TEXT[9], DLG_TEXT[10], DLG_TEXT[11], &dialog, dialog.snd1, dialog.snd2, dialog.snd3);
Alan picks a random choice of three things to say to you, one of which includes the line you found. (Useful hint when comparing the "dialog.c" and "dialog.h" files: line x in "dialog.h" is actually line x-2 as used in "dialog.c". This is because programmers count from 0, and the first line of "dialog.h" is the declaration of the array which will hold all the dialogs, 'string DLG_TEXT[56] = {'. So the second line of the file is the first line of the actual dialog text, which "dialog.c" regards as line 0.)

That line which you quoted is the 10th line of the "dialog.h" file, therefore line 8 in "dialog.c". It is combined with 'GetMyAddressForm' which figures out how Alan Milds would address you (he's English, you're male or female, so he'll probably say "Sir" or "Madam"), and then the next line from "dialog.h", to produce something like "Why, forsooth! My dear Sir. Pleased to see you. Shall we barter?" If Google Translate is to be believed, that translates to "¿Por qué, en verdad! Mi querido señor. Encantado de verte. Vamos a trueque?" So I'd put this in "Alan Milds_dialog.h":
Code:
"¿Por qué, en verdad! Mi #spronombre# ",
". Encantado de verte. Vamos a trueque?",

Also, where I can put that code which you have shown me? In the c. file of the correspondant dialog?
Yes. Something like this:
Code:
if (PChar.sex == "man")
    {
    Preprocessor_Add("pronombre", "querido");
    Preprocessor_Add("grado", "capitán");
    }
else
    {
    Preprocessor_Add("pronombre", "querida");
    Preprocessor_Add("grado", "capitana");
    }
d.Text = RandPhrase(DLG_TEXT[8] + GetMyAddressForm(NPChar, PChar, ADDR_IMPTITLE, false, false) + DLG_TEXT[9], DLG_TEXT[10], DLG_TEXT[11], &dialog, dialog.snd1, dialog.snd2, dialog.snd3);
This has also set up "grado" to be placed into the next text line so that it will be filled in by the appropriate version of "captain".

Note that 'GetMyAddressForm' always returns the title which the speaker would use in his own language. So what you'll actually see is "¿Por qué, en verdad! Mi querido sir. Encantado de verte. Vamos a trueque?" Likewise, if you're speaking to a Spanish character, he will address you as "señor" or "señorita" even if the dialog is in English. It may not be exactly correct but it serves to remind the player that he's talking to someone English, Spanish, Dutch or whatever. It means a Spanish shipyard owner, for example, will have dialog which looks a bit different from an English shipyard owner.
 
thinking about it a bit more.
All text still goes trough a processor right?
So you could use a define variable, like #captain for example.
And at the start of the game have it set to the right value depending on the gender ...
That won't work if you switch gender during the game. There are at least two ways you can do that. One is to start off the game as a male character, then buy yourself a female outfit from a tailor. The other is to play "Ardent" which starts you off male by default, then choose to play Helen Ardent when you face the Inquisitor.
 
I would definitely recommend to make those preprocessors English, because what you definitely don't want is to have different dialog.c files in use depending on the language.
That would be a recipe for instant distaster, so do whatever needs doing to ensure that is avoided!

If they're fairly generic, as in "captain" always needs to be gender-specific, I'd suggest not defining it inside the dialog files themselves because then you need to do it separately for every dialog.
Instead, what @Levis was hinting at, it could be added as a "general preprocessor in the entire game", which means you can define it once, then use it everywhere else.

@Grey Roger: If you recall, you did this once with the names of some priests for the Early Explorers time period.
The code for that particular example can be found in PROGRAM\Periods.c .

Useful hint when comparing the "dialog.c" and "dialog.h" files: line x in "dialog.h" is actually line x-2 as used in "dialog.c".
If you don't know about it yet, this little tool might prove useful:
http://www.piratesahoy.cloud/repository/Tools/Coding/DialogMerge.zip
It merges a .c and .h file so you can actually see what text goes where.
@Jack Rackham might be interested to know about this too, if he didn't already.

This is because programmers count from 0
In the PotC language, yes. Other languages may start with 1.
That's great fun when you use multiple languages and keep having to remember if they're zero-based or 1-based! :shock
 
That won't work if you switch gender during the game. There are at least two ways you can do that. One is to start off the game as a male character, then buy yourself a female outfit from a tailor. The other is to play "Ardent" which starts you off male by default, then choose to play Helen Ardent when you face the Inquisitor.
True. But we could probably add code to update the general preprocessor inside the "SetModel" function.
So if you switch to a female model, the relevant preprocessor is updated to match.
 
True. But we could probably add code to update the general preprocessor inside the "SetModel" function.
So if you switch to a female model, the relevant preprocessor is updated to match.
thats not that hard and could be usefull for other things.
We could just add a "Change_Gender" function somewhere and add what ever needs to be changed in there. maybe in future iterations we need more to be done.
Then you can just call the function from wherever you want or need.
 
I'm inclined to always use "Capitán" on both genders, but that's something I would like @Homo eructus to answer me.

Yes, use just "capitán" regardless. The form "capitán" can be used for both male and female. RAE

For "my dear" you'll have to find something neutral if possible or remove it, even if the phrase loses some flavor. When I have to deal with something like "my friend", I use "camarada" which serves for both genders, even if it's not perfect. I'm trying to think for a suitable neutral translation for "my dear" but none comes to mind, those that do are too affectionate ("cariño", "cielo", "tesoro") or too colloquial and modern ("prenda", "figura"), only suitable for very specoific situations (not a storekeepr, certainly). But I'd rather not mess with the actual code, doing that just to accomodate the Spanish translation could create incompatibilities with the English version.
 
Last edited:
I'm thinking on taking this a step further and translate the texture files of the books (is there a blank book texture somewhere? It would be way easier than erasing the writing), maybe even the loading screens and perhaps add subtitles to the videos of the Hornblower and Jack Sparrow storylines. Not a priority though, just a thought way down the line.
 
I don't think I have found the texts for the storylines/character selection descriptions in any of the general text files. I mean these:
01_StorylineFrancisDrake.jpg
Does anyone know where they are?

EDIT: Nevermind, I found them, they're in initModels.c. As that's outside of the ENGLISH folders, it sadluy means theat the translation will be Spanish only, that is, once you install it you won't be able to switch back to English without restoring the original files.
 
Last edited:
It is possible to relay that to a file in the RESOURCE\INI folder like is done for the model descriptions.
I didn't bother though, since I had given up on hoping for a finished translation a long time ago.
 
It is possible to relay that to a file in the RESOURCE\INI folder like is done for the model descriptions.
I didn't bother though, since I had given up on hoping for a finished translation a long time ago.

If it's not too difficult I could try. The models_description file seems pretty straightforward, just the original description and then the same again in {brackets} ready to be translated. But I guees it's not just that, there's probably more complicated code linking the files together or something.
 
In PROGRAM\INTERFACE\select_storyline.c search for idModelDescr to see how the files are linked.
You would need to do the same, but for model.storytext .
 
Back
Top