• 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

As long as it works, I suppose... o_O
I think I found the answer in Loginterface.c. There's a XI_ConvertString that wasn't there before
Code:
sDateTimeDisplay = XI_ConvertString(GetDayName(GetWeekday(iday, imonth, iyear))) + ", " + GetHumanDate(iyear, imonth, iday);
Mistery solved

EDIT: wait, maybe it was there in the first place, only I removed it to add it to each day in the calendar.c file instead for some reason. Mistery sort of solved anyway.
 
Last edited:
I think I found the answer in Loginterface.c. There's a XI_ConvertString that wasn't there before
Code:
sDateTimeDisplay = XI_ConvertString(GetDayName(GetWeekday(iday, imonth, iyear))) + ", " + GetHumanDate(iyear, imonth, iday);
Mistery solved

EDIT: wait, maybe it was there in the first place, only I removed it to add it to each day in the calendar.c file instead for some reason. Mistery sort of solved anyway.
Ok, I remember why I did it. The weekdays in the shiplog entries weren't translated. That's why I cut the translation string from the DateTimeDisplay and added it directly to each day in calendar.c. I think that's easier than adding the string to every entry that makes use of the weekdays, so I'll do that again.

Mistery definitely solved then.
 
More fun with switches

I added this one to change the order of words when the ransack screen displays an enemy as "Dead captain". I used the same structure as for the morale logs, and I remember it took some fiddling wirh but in the end it worked. Copying it now to the new version, the order still remains the same as in English
Code:
            case "corpse":
                                switch (LanguageGetLanguage()) {
                                case "Spanish":
                                    curEnemyName = XI_ConvertString("s"+"captain") + " " + XI_ConvertString("Dead");
                                  
                                    break;
                                    // default:
                    curEnemyName = XI_ConvertString("Dead") + " " + XI_ConvertString("s"+"captain");
                        }
This one has the } at the end and everything. So what would you say is wrong now?
 
Last edited:
A switch inside another switch, right?
The indentation looks a bit confusing, but that has no impact.
Other it seems OK at first glance.
 
How do I make so the corresponding good you need for the fetch quests is translated in the quest book?
I've been able to translate de type of each character (blacksmith, tailor...) with a regular XI_ConvertString but I don't know what to do for the goods
Code:
//Questbook
            Preprocessor_AddQuestData("town",ctown.name);
            Preprocessor_AddQuestData("type",XI_ConvertString("blacksmith"));
            Preprocessor_AddQuestData("amount",sti(NPChar.fetch_quest.amount));
            Preprocessor_AddQuestData("good",Goods[sti(NPChar.fetch_quest.good)].name);
            Preprocessor_AddQuestData("money",sti(NPChar.fetch_quest.money));
            Preprocessor_AddQuestData("date",NPChar.fetch_quest.expire);
When I've done this, I'll be almost ready to upload all the files that I've modified to add translation strings and provide a hopefully finished multilanguage framwork for the whole mod. The translated files themselves will take "a bit" longer.
 
Last edited:
Names of goods can presumably also be handled by "XI_ConvertString". For example, in "PROGRAM\INTERFACE\store.c", function RefreshAllStrings():
Code:
GameInterface.strings.GoodsName = XI_ConvertString(Goods[GetGoodsIndexForI(nCurScrollNum)].Name);
Goods names are certainly in "common.ini".
 
At
Goods[sti(NPChar.fetch_quest.good)].name , you mean?
Are there any INI files that already have the names of the goods in there?
If so, that is the one that needs to be called.
 
Finally, it's here!

No, not the Spanish translation but the framework to make it work, and to eventually make it easier for other translations to be implemented. This should be essentially the unfinished multilanguage support for the mod now finished, mostly I hope. There may be more translatable instances that have flown under my radar, particularly in dialog files, that I have barely touched (only the LogIt strings and a few other things I've found)

I've updated interface_strings.txt with I think over 700 lines of text that I've been hunting down across the files, I've added probably thousands of translation strings and a few Spanish-only switches for parts where the English grammar and word order doesn't fit the translation (big thanks to @Pieter Boelen , @Grey Roger and all the folks that have been dealing with my ineptitude in the translation thread:bow). There are some unorthodox solutions and workarounds to some issues but nothing that should affect the main English version of the mod. Other things may be horribly wrong because I still don't really know very well what I'm doing when program files are concerned, but everythings seems to work fine on my end without causing errors.

I've also included my updated ShipModels_descriptions.txt with an attempt to make the descriptions more standarized and informative. I'd appreciate your opinons on that. Also in the zip is an updated ships_mames.c with revised Spanish names. I haven't included my previous revised character names because @Grey Roger had made some further edits to it so my own version is already outdated. Both the ship and character names will also need to be merged with @DeathDaisy 's Swedish names.
 

Attachments

  • translation framework.zip
    1 MB · Views: 95
Finally, it's here!

No, not the Spanish translation but the framework to make it work, and to eventually make it easier for other translations to be implemented. This should be essentially the unfinished multilanguage support for the mod now finished, mostly I hope. There may be more translatable instances that have flown under my radar, particularly in dialog files, that I have barely touched (only the LogIt strings and a few other things I've found)

I've updated interface_strings.txt with I think over 700 lines of text that I've been hunting down across the files, I've added probably thousands of translation strings and a few Spanish-only switches for parts where the English grammar and word order doesn't fit the translation (big thanks to @Pieter Boelen , @Grey Roger and all the folks that have been dealing with my ineptitude in the translation thread:bow). There are some unorthodox solutions and workarounds to some issues but nothing that should affect the main English version of the mod. Other things may be horribly wrong because I still don't really know very well what I'm doing when program files are concerned, but everythings seems to work fine on my end without causing errors.

I've also included my updated ShipModels_descriptions.txt with an attempt to make the descriptions more standarized and informative. I'd appreciate your opinons on that. Also in the zip is an updated ships_mames.c with revised Spanish names. I haven't included my previous revised character names because @Grey Roger had made some further edits to it so my own version is already outdated. Both the ship and character names will also need to be merged with @DeathDaisy 's Swedish names.
supernice work! xD a herculean effort :whipa

I merged my ship_names.c with yours and updated my rars in the swedish names thread :cheers
 
Finally, it's here!

No, not the Spanish translation but the framework to make it work, and to eventually make it easier for other translations to be implemented. This should be essentially the unfinished multilanguage support for the mod now finished, mostly I hope. There may be more translatable instances that have flown under my radar, particularly in dialog files, that I have barely touched (only the LogIt strings and a few other things I've found)
If you don't mind, I'll hold off adding this until the next, next update archive. I want to release the next one this week as there is already a lot of stuff waiting to be incorporated into a general release, and that translation framework involves a lot of changed files which will mean it will need a good deal of testing to make sure it doesn't break any existing gameplay. Also, some work is needed - a quick check with WinMerge shows, for example, that rank names are being translated, which they should not be as they're already in the native language of the nation which owns the ranks. It doesn't matter if you as a player speak English, Spanish or anything else; if your character has a Dutch LoM and has just been promoted to rank 7, then your rank name is "Kapitein ter Zee" because that's what Holland calls it.

Ship and character names, on the other hand, are safe enough, so they're going into this week's release.
 
The ranks are "translated" because they were already in the commons.ini file, I didn't add them. The translation given is not a translation, but the exact same text, so it shouldn't change anything (except some of the Spanish and Portuguese ranks that I changed to be more accurate, and the Pirate ranks because they're not as much ranks as expressions of your piratical fame and thus should be translated).
 
Hmm, playtesting the pronouns in Ardent's storyline I came across the Taino chief and his "lastname" isn't translated, when all the other indians are fully translated. The files seem to be 100% right. I wonder if it'll have something to do with the fact that the chief's name is Soaring Hawk, and the game is somehow confusing it with the last name of our own and only Nathaniel Hawk from the standard storyline, who of course doesn't have a translation associated to it. Any thought, @Grey Roger ?
 
Also, I found an error in the INTERFACE/Shipyard.c file that I uploaded in the multilanguage pack. Some repeated + signs in the log entry for the ship upgrades messed up the upgrade interface. Here it is fixed
 

Attachments

  • shipyard.c
    183.6 KB · Views: 124
Hmm, playtesting the pronouns in Ardent's storyline I came across the Taino chief and his "lastname" isn't translated, when all the other indians are fully translated. The files seem to be 100% right. I wonder if it'll have something to do with the fact that the chief's name is Soaring Hawk, and the game is somehow confusing it with the last name of our own and only Nathaniel Hawk from the standard storyline, who of course doesn't have a translation associated to it. Any thought, @Grey Roger ?
Id guess hawk have two entries in character_names.txt then? so the one that comes first is hawk from nathaniel hawk and the translated comes next? idk if thats the case, but if it is maybe soaring hawks last name in ardent/characters/tempquest.c could be turned into an xi_convertstring instead of a translatestring and hawk put into the spanish common.ini. dunno if that would work, but perhaps worth a try?
 
Id guess hawk have two entries in character_names.txt then?
That shouldn't be the case, as the Ardent storyline has its own character_names.txt separate from the main one, although it may be that the main one overwrites the other somehow if the same name is repeated.

maybe soaring hawks last name in ardent/characters/tempquest.c could be turned into an xi_convertstring instead of a translatestring and hawk put into the spanish common.ini. dunno if that would work, but perhaps worth a try?
That or directly changing Hawk for a placeholder in tempquest.c (like "Hawk1" or whatever) and then translating that in both the English and Spanish character_names files for Hawk and the corresponding Spanish. From my limited knowledge, I personally prefer this option because it seems to me it would be easier to track down later and recognize why it was done in the first place.
 
Back
Top