• 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!

PTBR Translation

That's likely to be tricky! For a start, you'll need to create folders "RESOURCE\INI\TEXTS\PORTUGUESE" and "PROGRAM\DIALOGS\PORTUGUESE". Those are where most of your translations will go. Individual storylines also have their own dialog folders, e.g "PROGRAM\Storyline\standard\DIALOGS", which will also need "PORTUGUESE" sub-folders for translations. But the single most important file is "RESOURCE\INI\TEXTS\PORTUGUESE\common.ini" because the game won't recognise that the language exists if it has no "common.ini". (Replace "PORTUGUESE" with whatever you want to call the language. Just make sure it is consistent throughout.)
I was looking at the common.ini file, I found a "languages" section, I understand that I must declare the new language in this section, am I correct?
 
Yes, look for anything that mentions Russian. If there is nothing about Portuguese there, you probably need to add it. For example:
Code:
string = IntRussian,"Russian"
Code:
string = be_Russian,"Russian"
Code:
string = lng Russian,"Russian"
The other translation of the game is Spanish, but Spain is also a nationality in the game - you'll find Spanish towns and ships, and various translation text about Spain and Spanish. Russia is not a nation in the game but there is a Russian translation, so anything about Russian must be for that translation.
 
Hey guys!!!
Using AI for translation has become unfeasible, AI only translates a few lines and makes it difficult to translate the rest of the file.

I used a spreadsheet with some formulas and VBA resources to process the texts, separating the part to be translated, then I play go google translation and paste it back, the spreadsheet reassembles the lines and even performs some integrity validations.

The translation provided by Google is not perfect but it is viable to use.

I inserted the folder "...\RESOURCE\INI\TEXTS\PORTUGUESE" copying from English and translated its contents, I used this folder to replace the English language and the PTBR interface.

Some characters are not accepted on some interface screens so I will have to do some revision by removing accents and tildes, it looks strange but it is possible to understand the reading.

Following Grey Roger's instructions I was unable to include the PTBR language, I just substituted English.

I will continue translating "..\POTC\PROGRAM\Storyline" into a dialog folder for each story in the game.

The hardest work will be translating the 490 dialog files located in "..\POTC\PROGRAM\DIALOGS\PORTUGUESE" which is a copy of the folder "..\POTC\PROGRAM\DIALOGS\ENGLISH".

Are there any Brazilians on this forum willing to help?
Translation using Google and my spreadsheet is limited to CTRL+C/V and a few clicks, standard files with less than 5000 characters to translate takes less than 1 minute.

Maybe I can improve VBA to loop through files.
 
Yes, look for anything that mentions Russian. If there is nothing about Portuguese there, you probably need to add it. For example:
Code:
string = IntRussian,"Russian"
Code:
string = be_Russian,"Russian"
Code:
string = lng Russian,"Russian"
The other translation of the game is Spanish, but Spain is also a nationality in the game - you'll find Spanish towns and ships, and various translation text about Spain and Spanish. Russia is not a nation in the game but there is a Russian translation, so anything about Russian must be for that translation.
How stupid of me!! I only read your response today, I didn't realize that the page had changed.
it´s work!! PTBR keyboard option appeared, but this is the same for English, I still haven't been able to list the language.
 
Last edited:
Hey guys!!!
Using AI for translation has become unfeasible, AI only translates a few lines and makes it difficult to translate the rest of the file.

I used a spreadsheet with some formulas and VBA resources to process the texts, separating the part to be translated, then I play go google translation and paste it back, the spreadsheet reassembles the lines and even performs some integrity validations.

The translation provided by Google is not perfect but it is viable to use.
AI and Google are useful for a start but you'll want to check the results. The Russian and Spanish translations started off the same way, and when the live translators looked at the results, they were not impressed!
 
AI and Google are useful for a start but you'll want to check the results. The Russian and Spanish translations started off the same way, and when the live translators looked at the results, they were not impressed!
Yes, you need to understand the essence of what is happening in order to translate the sentence correctly. And to do this you need to go through everything in the game, which is what I do. At the moment, there are 9 side quests left to check, and also to play the Jack Sparrow line, it seems there are special quests there. Also, the Ardent is for a woman, but I think that there will be no more errors there, or a minimal number. In addition, you need to change all the old files that only address a man (for example in a tavern) and make them for free play.
 
Watch for preprocessed labels, which start with "#s" and end with "#". Don't translate those! There will be code somewhere to replace them with proper text and it won't work if the label in the text does not match the label in the code. For example, "Malcolm Hatcher_dialog.h" has "#ssir#". "Malcolm Hatcher_dialog.c" has code to replace "#ssir#" using a function to provide the correct title depending on your nation and gender, and that title will be translated in "RESOURCE\INI\TEXTS\ENGLISH\common.ini".
 
Watch for preprocessed labels, which start with "#s" and end with "#". Don't translate those! There will be code somewhere to replace them with proper text and it won't work if the label in the text does not match the label in the code. For example, "Malcolm Hatcher_dialog.h" has "#ssir#". "Malcolm Hatcher_dialog.c" has code to replace "#ssir#" using a function to provide the correct title depending on your nation and gender, and that title will be translated in "RESOURCE\INI\TEXTS\ENGLISH\common.ini".
I noticed these variables, in Excel I have an integrity check feature precisely for this.
Google translation sometimes incorrectly translates variable names itemname itmdescr, I also implemented an integrity feature to avoid this.
But check the context and interpretation of the translation to adapt the language's standard language just by looking at them one by one. It's somewhat impractical to do this alone, but most people here don't really care if it's correct or not as long as they understand what it means.
It seems that in some cases it does not accept any accented characters or Ç for example in the storyline_strings.txt file
 
Last edited:
You will often find pieces of sentences. For example, in "John Clifford Brin_dialog.h":
Code:
"I'm told you've gone to great lengths to request an audience. My name is ",
". Now, if you please, tell me the purpose of your visit, ",
".",
These are put together in "John Clifford Brin_dialog.c":
Code:
dialog.text = DLG_TEXT[0] + GetMyFullName(NPChar) + DLG_TEXT[1] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[2];
That's the first line of text, his name, the second line of text, his way of addressing you ("Mister" or "Miss" depending on your gender), and finally the third line of text. So what you will see on screen will be something like "I'm told you've gone to great lengths to request an audience. My name is John Clifford Brin. Now, if you please, tell me the purpose of your visit, Mister."

The third line of text is just a full stop in English. That's to help translators! Some languages might look better with something else after the "Mister"; if so, it can go onto that third line. You may find other dialog text lines which are just full stops or other punctuation, for the same reason.
 
I put the content of the file in column B, I copy column G to translate on Google, I put translation in column I, column H makes some adjustments like replacing ã with Ý removing õ (not accepted anywhere) column L is the final product of the translation.
Columns N and O are for integrity check,
the other columns are field separation formulas and validation conditions, the buttons help with copy/paste to determine which line the formulas are copied to, test integrity as in the case of variables delimited with #, this works for 99% of cases.
With this I can quickly translate each file just by copying and pasting while maintaining the original structure.

Unforeseen executions occur.
For example the line below
string = titleKAMSelectCharacter,"SELECT OUTFIT"§// changed after release of v11 by KAM

the final final product was:
string = titleKAMSelectCharacter,"SELECT OUTFIT§// changed after release of v11 by KAM"

Did you notice the §? This is a replacement of the tab, I do this before pasting otherwise it messes everything up, at the end I restore the tab.


1703012386285.png
 
For dialog translation, the file structure is different and constitutes an array of strings that may or may not have variables delimited by #.
the previous spreadsheet won't work, I'm putting together another one, I'll add some buttons with VBA and new formulas, validations and integrity tests.
In both spreadsheets I will not review the Google translation, but from the samples I observed, it is satisfactory.
1703013178690.png
 
That's likely to be tricky! For a start, you'll need to create folders "RESOURCE\INI\TEXTS\PORTUGUESE" and "PROGRAM\DIALOGS\PORTUGUESE". Those are where most of your translations will go. Individual storylines also have their own dialog folders, e.g "PROGRAM\Storyline\standard\DIALOGS", which will also need "PORTUGUESE" sub-folders for translations. But the single most important file is "RESOURCE\INI\TEXTS\PORTUGUESE\common.ini" because the game won't recognise that the language exists if it has no "common.ini". (Replace "PORTUGUESE" with whatever you want to call the language. Just make sure it is consistent throughout.)
Hello Gray Roger!
-I've already translated more than 500 files and I still haven't reached the "PROGRAM\DIALOGS\PORTUGUESE" folder.
Characters "Õ", "õ" and "Ã", I left without the "~". Any Brazilian will notice the lack of the symbol and will understand the reading.

-It could be that I made a mistake and messed up the file structure, is there any way to identify this during the game? (like a text warning in a semi-transparent corner of the screen)

-I still haven't been able to get the language switch to work.

-Did you mention translating the content of "PROGRAM\Storyline\standard\DIALOGS", and the other storyline dialogues? Are they not working??
 
I was thinking about how many files it takes to have the game completely in PTBR, around 1500 files, I've already translated around 800, 216 are missing from the storyline and 490 from the dialogue folder.
You can't review this alone.
 
Which file contains the text that appears as a tooltip when the environment the character is in changes? like entering through the city gate.
1704310472208.png
 
Back
Top