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

BUILD 14 BETA 3.1 Polish translation

ahoy mateys !

its true that i have trouble with some special french letters but i still dont know how to fix this, at the moment i put "c" instead of "ç" for example :(

still have real much files to translate in detail, so i try to not bother with this too much, teh good point is that french letters arent that difficult to replace

i also test caribbean! alpha stage (REAL good) and mod in other games like anno series / total war series and more, + final exams coming so at the moment i did a pause with POTC

sorry to not help much :(
 
Here are exactly the same code fragments from stock game that Baste pasted here but opened on my Polish Windows 7 Notepad:
Code:
"Wczoraj prosił mnie pan, bym przypomniał mu o kilku planowanych na dzisiaj rzeczach.",
"Naprawdę? Co to było?",
"Pamiętam wszystko dość dobrze. Dzięki.",
"Po pierwsze, proszę wziąć swój ekwipunek. Powinien pan pamiętać, by zawsze mieć przy sobie swoją szablę, pistolet i lunetę. Kto wie, co się może przytrafić.",
"Gdzie to wszystko położyłem?",
Code:
; Ships parameters
string = Hull,"Kadłub"
string = Sails,"Żagle"
string = Crew,"Załoga"
string = Cannons,"Armaty"
string = Speed,"Szybkość"
string = Maneuver,"Zwrotność"
string = Max.Caliber,"Maks. tonaż dział"
string = Max.Crew,"Maks. licz. załogi"
string = Min.Crew,"Min. licz. załogi"
string = Capacity,"Ładowność"
string = Rig,"Takielunek"

; Character skills
string = Leadership,"Dowodzenie"
string = Fencing,"Walka"
string = Sailing,"Żeglarstwo"
string = Accuracy,"Celność"
string = Grappling,"Abordaż"
string = Repair,"Naprawa"
string = Defence,"Obrona"
string = Commerce,"Handel"
string = Sneak,"Szczęście"
string = Free Skill Points,"Zdolność"
string = Abilities,"Umiejętności"
Every letter looks fine here, so Baste, the strange display of these letters is only fault of your Windows language version.
All Polish letters ARE in code and DO WORK. I wonder why they don't in Build.
 
Last edited:
Another matter: can we somehow make files uploaded here visible only to proper people. I prefer the translated files to stay unpublic for now. Imagine somebody else downloads them and claims its his. Well, sadly, my country got used to such incidents.
 
Thread moved to the "POTC Modding" forum, which is accessible only to "Storm Modders".
Vixor has now been added to that group so that he still has access.
 
Yes, I get the same result if I enable Polish language support, then it shows correctly in the stock files for me as well. But, no matter what I do, I can't get it to work in the build files.
 
Thread moved to the "POTC Modding" forum, which is accessible only to "Storm Modders".
Vixor has now been added to that group so that he still has access.
Thank you very much.
Yes, I get the same result if I enable Polish language support, then it shows correctly in the stock files for me as well. But, no matter what I do, I can't get it to work in the build files.
Thanks for checking. I think we have to find the difference between Build an stock game fonts system that blocks it.
 
I have sent a PM to KK about this. I hope he sees it and is able to lend assistance. Unless Levis or another programmer understands it and knows what to do. I have no more ideas of what I could try. I think it should be possible to rewrite the code to make it possible to have Polish characters in it, but I don't know how to do it.
 
Please explain what the problem is exactly?
 
When Fjx wants to make a Polish character appear in the game he must use a special character in the code. When he wants "Ą" in the game he must use "¥" in the code, when he wants "ą" in the game he must use "¹" in the code, and so on. In the stock Polish version he doesn't need to do this, and wants to be able to type normally in the Build Mod as well without the need for special characters. By studying the code I am lead to believe that it should be possible and that it has something to do with this code in the utils.c file:
Code:
string toupperpol(string c)
{
    switch(c)
    {
        case "¹": return "¥"; break;
        case "å": return "þ"; break;
        case "×": return "½"; break;
        case "³": return "£"; break;
        case "ð": return "ý"; break;
        case "ó": return "Ó"; break;
        case "›": return ""; break;
        case "Ÿ": return ""; break;
        case "ž": return "¯"; break;
    }
    return touppereng(c);
}

string tolowerpol(string c)
{
    switch(c)
    {
        case "¥": return "¹"; break;
        case "þ": return "å"; break;
        case "½": return "×"; break;
        case "£": return "³"; break;
        case "ý": return "ð"; break;
        case "Ó": return "ó"; break;
        case "": return "›"; break;
        case "": return "Ÿ"; break;
        case "¯": return "ž"; break;
    }
    return tolowereng(c);
}

// Returns characteristic letter for language when ALT is pressed together with "c"
string GetDiacriticalChar(string c, string lang)
{
    switch (lang) {
        case "French":
            switch (c) {
                case "a": return "à"; break;
                case "s": return "â"; break;
                case "c": return "ç"; break;
                case "w": return "è"; break;
                case "e": return "é"; break;
                case "d": return "ê"; break;
                case "i": return "ï"; break;
                case "q": return "æ"; break;
                case "r": return "ë"; break;
                case "t": return "œ"; break;
                case "n": return "ñ"; break;
                case "o": return "ô"; break;
                case "h": return "ü"; break;
                case "y": return "Å"; break;
                case "u": return "ù"; break;
            }
        break;
        case "German":
            switch (c) {
                case "a": return "ä"; break;
                case "o": return "ö"; break;
                case "s": return "ß"; break;
                case "u": return "ü"; break;
            }
        break;
        case "Spanish":
            switch (c) {
                case "a": return "á"; break;
                case "e": return "é"; break;
                case "i": return "í"; break;
                case "n": return "ñ"; break;
                case "o": return "ó"; break;
                case "u": return "ú"; break;
                case "y": return "ü"; break;
                case "/": return "¿"; break;
                case "1": return "¡"; break;
            }
        break;
        case "Polish":
            switch (c) {
                case "a": return "¹"; break;
                case "c": return "å"; break;
                case "e": return "×"; break;
                case "l": return "³"; break;
                case "n": return "ð"; break;
                case "o": return "ó"; break;
                case "s": return "›"; break;
                case "x": return "Ÿ"; break;
                case "z": return "ž"; break;
            }
        break;
    }
    return c;
}
I have tried to change this and make it possible to use Polish characters but I haven't been successful, and I don't understand much of the code in that file. I can understand that it would be tedious to have to use "¥" and so on every time instead of simply using "Ą" and so on, so I'm wondering if it is possible to change the code so that Polish characters can be used normally. I'm thinking that it should be possible, but I could be wrong.
 
Last edited:
Those do seem to be the relevant funtions yes.
The problem here is encoding, but If you say it should work then we can just try it.
What the toupperpol function does is changing the upper signs to lower signs so if you have Ą there it should return ą etc.
The second function is this the other way around. You can just make it like this (for the first one):
Code:
case "Ą": return "ą"; break;
And in that way add everything.

The third function (GetDiacriticalChar) is as far as I can see for typing. This returns a specific character if you press alt. So say you want it to return ą when pressing alt+a then you should make it like this:
Code:
case "a": return "ą"; break;
Make sure you only change it for the polish language in this function.

Try it that helps :), I think it wont cause I'm afraid the game can't handle these characters but if it does that would be nice and then this should fix it.
 
Yes, that is one of the things I have tried, and I even changed the characters in this part:
Code:
string ChrFromCode(int code)
{
    switch (code) {
        case 32: return " "; break;
        case 33: return "!"; break;
        case 34: return GlobalStringConvert("DOUBLE_QUOTE"); break;
        case 35: return "#"; break;
        case 36: return "$"; break;
        case 37: return "%"; break;
        case 38: return "&"; break;
        case 39: return "'"; break;
        case 40: return "("; break;
        case 41: return ")"; break;
        case 42: return "*"; break;
        case 43: return "+"; break;
        case 44: return ","; break;
        case 45: return "-"; break;
        case 46: return "."; break;
        case 47: return "/"; break;
        case 48: return "0"; break;
        case 49: return "1"; break;
        case 50: return "2"; break;
        case 51: return "3"; break;
        case 52: return "4"; break;
        case 53: return "5"; break;
        case 54: return "6"; break;
        case 55: return "7"; break;
        case 56: return "8"; break;
        case 57: return "9"; break;
        case 58: return ":"; break;
        case 59: return ";"; break;
        case 60: return "<"; break;
        case 61: return "="; break;
        case 62: return ">"; break;
        case 63: return "?"; break;
        case 64: return "@"; break;
        case 65: return "A"; break;
        case 66: return "B"; break;
        case 67: return "C"; break;
        case 68: return "D"; break;
        case 69: return "E"; break;
        case 70: return "F"; break;
        case 71: return "G"; break;
        case 72: return "H"; break;
        case 73: return "I"; break;
        case 74: return "J"; break;
        case 75: return "K"; break;
        case 76: return "L"; break;
        case 77: return "M"; break;
        case 78: return "N"; break;
        case 79: return "O"; break;
        case 80: return "P"; break;
        case 81: return "Q"; break;
        case 82: return "R"; break;
        case 83: return "S"; break;
        case 84: return "T"; break;
        case 85: return "U"; break;
        case 86: return "V"; break;
        case 87: return "W"; break;
        case 88: return "X"; break;
        case 89: return "Y"; break;
        case 90: return "Z"; break;
        case 91: return "["; break;
        case 92: return "\"; break;
        case 93: return "]"; break;
        case 94: return "^"; break;
        case 95: return "_"; break;
        case 96: return "`"; break;
        case 97: return "a"; break;
        case 98: return "b"; break;
        case 99: return "c"; break;
        case 100: return "d"; break;
        case 101: return "e"; break;
        case 102: return "f"; break;
        case 103: return "g"; break;
        case 104: return "h"; break;
        case 105: return "i"; break;
        case 106: return "j"; break;
        case 107: return "k"; break;
        case 108: return "l"; break;
        case 109: return "m"; break;
        case 110: return "n"; break;
        case 111: return "o"; break;
        case 112: return "p"; break;
        case 113: return "q"; break;
        case 114: return "r"; break;
        case 115: return "s"; break;
        case 116: return "t"; break;
        case 117: return "u"; break;
        case 118: return "v"; break;
        case 119: return "w"; break;
        case 120: return "x"; break;
        case 121: return "y"; break;
        case 122: return "z"; break;
        case 123: return "{"; break;
        case 124: return "|"; break;
        case 125: return "}"; break;
        case 126: return ""; break;
        case 127: return ""; break;
        case 128: return ""; break;
        case 129: return ""; break;
        case 130: return ""; break;
        case 131: return ""; break;
        case 132: return ""; break;
        case 133: return ""; break;
        case 134: return ""; break;
        case 135: return ""; break;
        case 136: return ""; break;
        case 137: return ""; break;
        case 138: return ""; break;
        case 139: return ""; break;
        case 140: return "Œ"; break;
        case 141: return ""; break;
        case 142: return ""; break;
        case 143: return ""; break;
        case 144: return ""; break;
        case 145: return "‘"; break;
        case 146: return "’"; break;
        case 147: return "“"; break;
        case 148: return "”"; break;
        case 149: return ""; break;
        case 150: return "–"; break;
        case 151: return "—"; break;
        case 152: return ""; break;
        case 153: return ""; break;
        case 154: return ""; break;
        case 155: return "›"; break;
        case 156: return "œ"; break;
        case 157: return ""; break;
        case 158: return "ž"; break;
        case 159: return "Ÿ"; break;
        case 160: return ""; break;
        case 161: return "¡"; break;
        case 162: return ""; break;
        case 163: return "£"; break;
        case 164: return "¤"; break;
        case 165: return "¥"; break;
        case 166: return ""; break;
        case 167: return ""; break;
        case 168: return ""; break;
        case 169: return ""; break;
        case 170: return ""; break;
        case 171: return "«"; break;
        case 172: return ""; break;
        case 173: return ""; break;
        case 174: return ""; break;
        case 175: return "¯"; break;
        case 176: return ""; break;
        case 177: return ""; break;
        case 178: return ""; break;
        case 179: return "³"; break;
        case 180: return ""; break;
        case 181: return ""; break;
        case 182: return ""; break;
        case 183: return ""; break;
        case 184: return ""; break;
        case 185: return "¹"; break;
        case 186: return ""; break;
        case 187: return "»"; break;
        case 188: return ""; break;
        case 189: return "½"; break;
        case 190: return ""; break;
        case 191: return "¿"; break;
        case 192: return "À"; break;
        case 193: return "Á"; break;
        case 194: return "Â"; break;
        case 195: return "Ã"; break;
        case 196: return "Ä"; break;
        case 197: return "Å"; break;
        case 198: return "Æ"; break;
        case 199: return "Ç"; break;
        case 200: return "È"; break;
        case 201: return "É"; break;
        case 202: return "Ê"; break;
        case 203: return "Ë"; break;
        case 204: return "Ì"; break;
        case 205: return "Í"; break;
        case 206: return "Î"; break;
        case 207: return "Ï"; break;
        case 208: return "Ð"; break;
        case 209: return "Ñ"; break;
        case 210: return "Ò"; break;
        case 211: return "Ó"; break;
        case 212: return "Ô"; break;
        case 213: return "Õ"; break;
        case 214: return "Ö"; break;
        case 215: return "×"; break;
        case 216: return "Ø"; break;
        case 217: return "Ù"; break;
        case 218: return "Ú"; break;
        case 219: return "Û"; break;
        case 220: return "Ü"; break;
        case 221: return "Ý"; break;
        case 222: return "Þ"; break;
        case 223: return "ß"; break;
        case 224: return "à"; break;
        case 225: return "á"; break;
        case 226: return "â"; break;
        case 227: return "ã"; break;
        case 228: return "ä"; break;
        case 229: return "å"; break;
        case 230: return "æ"; break;
        case 231: return "ç"; break;
        case 232: return "è"; break;
        case 233: return "é"; break;
        case 234: return "ê"; break;
        case 235: return "ë"; break;
        case 236: return "ì"; break;
        case 237: return "í"; break;
        case 238: return "î"; break;
        case 239: return "ï"; break;
        case 240: return "ð"; break;
        case 241: return "ñ"; break;
        case 242: return "ò"; break;
        case 243: return "ó"; break;
        case 244: return "ô"; break;
        case 245: return "õ"; break;
        case 246: return "ö"; break;
        case 247: return "÷"; break;
        case 248: return "ø"; break;
        case 249: return "ù"; break;
        case 250: return "ú"; break;
        case 251: return "û"; break;
        case 252: return "ü"; break;
        case 253: return "ý"; break;
        case 254: return "þ"; break;
    }
    return "";
}

int ascii(string chr)
{
    string ch = GetSymbol(chr, 0);
    if (ch == GlobalStringConvert("DOUBLE_QUOTE")) return 34;
    switch (ch)
    {
        case " ": return 32; break;
        case "!": return 33; break;
        case "#": return 35; break;
        case "$": return 36; break;
        case "%": return 37; break;
        case "&": return 38; break;
        case "'": return 39; break;
        case "(": return 40; break;
        case ")": return 41; break;
        case "*": return 42; break;
        case "+": return 43; break;
        case ",": return 44; break;
        case "-": return 45; break;
        case ".": return 46; break;
        case "/": return 47; break;
        case "0": return 48; break;
        case "1": return 49; break;
        case "2": return 50; break;
        case "3": return 51; break;
        case "4": return 52; break;
        case "5": return 53; break;
        case "6": return 54; break;
        case "7": return 55; break;
        case "8": return 56; break;
        case "9": return 57; break;
        case ":": return 58; break;
        case ";": return 59; break;
        case "<": return 60; break;
        case "=": return 61; break;
        case ">": return 62; break;
        case "?": return 63; break;
        case "@": return 64; break;
        case "A": return 65; break;
        case "B": return 66; break;
        case "C": return 67; break;
        case "D": return 68; break;
        case "E": return 69; break;
        case "F": return 70; break;
        case "G": return 71; break;
        case "H": return 72; break;
        case "I": return 73; break;
        case "J": return 74; break;
        case "K": return 75; break;
        case "L": return 76; break;
        case "M": return 77; break;
        case "N": return 78; break;
        case "O": return 79; break;
        case "P": return 80; break;
        case "Q": return 81; break;
        case "R": return 82; break;
        case "S": return 83; break;
        case "T": return 84; break;
        case "U": return 85; break;
        case "V": return 86; break;
        case "W": return 87; break;
        case "X": return 88; break;
        case "Y": return 89; break;
        case "Z": return 90; break;
        case "[": return 91; break;
        case "\": return 92; break;
        case "]": return 93; break;
        case "^": return 94; break;
        case "_": return 95; break;
        case "`": return 96; break;
        case "a": return 97; break;
        case "b": return 98; break;
        case "c": return 99; break;
        case "d": return 100; break;
        case "e": return 101; break;
        case "f": return 102; break;
        case "g": return 103; break;
        case "h": return 104; break;
        case "i": return 105; break;
        case "j": return 106; break;
        case "k": return 107; break;
        case "l": return 108; break;
        case "m": return 109; break;
        case "n": return 110; break;
        case "o": return 111; break;
        case "p": return 112; break;
        case "q": return 113; break;
        case "r": return 114; break;
        case "s": return 115; break;
        case "t": return 116; break;
        case "u": return 117; break;
        case "v": return 118; break;
        case "w": return 119; break;
        case "x": return 120; break;
        case "y": return 121; break;
        case "z": return 122; break;
        case "{": return 123; break;
        case "|": return 124; break;
        case "}": return 125; break;
        case "Œ": return 140; break;
        case "": return 141; break;
        case "": return 143; break;
        case "‘": return 145; break;
        case "’": return 146; break;
        case "“": return 147; break;
        case "”": return 148; break;
        case "–": return 150; break;
        case "—": return 151; break;
        case "›": return 155; break;
        case "œ": return 156; break;
        case "ž": return 158; break;
        case "Ÿ": return 159; break;
        case "¡": return 161; break;
        case "£": return 163; break;
        case "¤": return 164; break;
        case "¥": return 165; break;
        case "«": return 171; break;
        case "": return 173; break;
        case "¯": return 175; break;
        case "³": return 179; break;
        case "¹": return 185; break;
        case "»": return 187; break;
        case "½": return 189; break;
        case "¿": return 191; break;
        case "À": return 192; break;
        case "Á": return 193; break;
        case "Â": return 194; break;
        case "Ã": return 195; break;
        case "Ä": return 196; break;
        case "Å": return 197; break;
        case "Æ": return 198; break;
        case "Ç": return 199; break;
        case "È": return 200; break;
        case "É": return 201; break;
        case "Ê": return 202; break;
        case "Ë": return 203; break;
        case "Ì": return 204; break;
        case "Í": return 205; break;
        case "Î": return 206; break;
        case "Ï": return 207; break;
        case "Ð": return 208; break;
        case "Ñ": return 209; break;
        case "Ò": return 210; break;
        case "Ó": return 211; break;
        case "Ô": return 212; break;
        case "Õ": return 213; break;
        case "Ö": return 214; break;
        case "×": return 215; break;
        case "Ø": return 216; break;
        case "Ù": return 217; break;
        case "Ú": return 218; break;
        case "Û": return 219; break;
        case "Ü": return 220; break;
        case "Ý": return 221; break;
        case "Þ": return 222; break;
        case "ß": return 223; break;
        case "à": return 224; break;
        case "á": return 225; break;
        case "â": return 226; break;
        case "ã": return 227; break;
        case "ä": return 228; break;
        case "å": return 229; break;
        case "æ": return 230; break;
        case "ç": return 231; break;
        case "è": return 232; break;
        case "é": return 233; break;
        case "ê": return 234; break;
        case "ë": return 235; break;
        case "ì": return 236; break;
        case "í": return 237; break;
        case "î": return 238; break;
        case "ï": return 239; break;
        case "ð": return 240; break;
        case "ñ": return 241; break;
        case "ò": return 242; break;
        case "ó": return 243; break;
        case "ô": return 244; break;
        case "õ": return 245; break;
        case "ö": return 246; break;
        case "÷": return 247; break;
        case "ø": return 248; break;
        case "ù": return 249; break;
        case "ú": return 250; break;
        case "û": return 251; break;
        case "ü": return 252; break;
        case "ý": return 253; break;
        case "þ": return 254; break;
    }
    return 0;
}
Unfortunately, it didn't work. I'm not sure if it is possible to make it possible to use Polish characters normally, but I'm thinking that it should be possible since it's apparently possible in the stock Polish version, among other reasons.
 
Isn't that obvious that in order to have "normal Polish letters" visible in game one also need to modify font file? Otherwise, there will be wrong characters in the text. I post a reply to Baste explaining why I believe it's better to keep it this way and that I'm plan to write a converter to remedy the issue.
 
I asumed they already took the font file from the polish version cause Thats what i said a while back already....
 
The third function (GetDiacriticalChar) is as far as I can see for typing. This returns a specific character if you press alt. So say you want it to return ą when pressing alt+a then you should make it like this:
Code:
case "a": return "ą"; break;
That's just how we type them. We haven't special "Polish keyboards".
 
Yes, it's obvious that one needs to modify the font file, and I had a look at it, but I couldn't get it to work. The font files from the stock Polish version wouldn't work since it doesn't have some textures that are used in the Build Mod. Good thing about a converter, though. Should make things easier for Fjx.
 
Yes, it's obvious that one needs to modify the font file, and I had a look at it, but I couldn't get it to work. The font files from the stock Polish version wouldn't work since it doesn't have some textures that are used in the Build Mod. Good thing about a converter, though. Should make things easier for Fjx.
You must draw a letter, then put it code and coordinates on the picture into it. It's not hard, but I think that better solution would be to create a converter and use existing system. I'm not trying to force or suggest that my solution is the best possible; I'm open for suggestions. When I get myself and make source code of CoAS into some working state, I'll try to implement unicode support for it - that would make life easier, at least for CoAS modders.
 
The easiest way (to me it seems) is just add the new letters to the texture file and add the coordinates and then let the game know. But I dont have time to work it out now. After pieter is gone I have more time again but till the I want to get as much done as possible on bug fixes etc.
 
I think a converter seems like the best option in this case. Compatibility with the code and the textures.

By the way, how does one find a coordinate in a texture file? If I open fonts_euro.ini I see several coordinates, but how do I find them in the texture file in the first place? Trial and error and calculating? Seems a bit tedious for that many coordinates. Could be good to know for future reference.
 
  • Like
Reactions: fjx
Back
Top