 |   |  |  |
Warcraft Discussion Discuss topics related to Blizzard's Warcraft franchise, including Warcraft I, II and III. Ask questions about anything not covered in other forums. Want to discuss topics related to World of Warcraft? Go to the World of Warcraft Forum. |
 |
|
11-22-2008, 10:17 PM
|
#1 (permalink)
|
Anozer jasser
Join Date: Apr 2008
Posts: 237
|
Need an international help, test the map attached , for help me to make a function
How many installation language we get for warcraft 3 ?
And how do you say "Footman" in these languages ?
GetObjectName('hfoo') == ?
Chinese -> "步兵"
Czech -> "Pěšák"
English -> "Footman"
French -> "Fantassin"
German -> "Soldat"
Italian -> "Fante"
Japanese -> ?
Korean -> ?
Polish -> "Piechur"
Russian -> "Пехотинец"
Spanish -> "Soldado raso"
Ofc if you don't change the unit name ('hfoo') ...
Sorry if i forgot some countries, they are just not written on the official blizzard website for the patches.
I want to know this, for make a function which can get the language of warcraft installed.
Edit : Because i can't use in the editor the Russian and Chinese letters, i must play with localized strings length.
Here is a testmap.
Could you test it and takes screenshots of the box messages ?
Since there are 24 localized strings, 2 screenshots should be enough.
If i get screenshots of all warcraft3 languages, i will no need anymore the requirement of a footman unit with the default name.
Thx in advance.
Last edited by Troll-Brain; 12-28-2008 at 12:42 PM..
|
|
|
11-22-2008, 10:19 PM
|
#2 (permalink)
|
Low Map Maker
Join Date: Mar 2008
Posts: 89
|
czech is that Pěák = Pesak
__________________
 This trigger doesn´t work
|
|
|
11-22-2008, 10:37 PM
|
#3 (permalink)
|
Anozer jasser
Join Date: Apr 2008
Posts: 237
|
Quote:
Originally Posted by Darkhunty
czech is that Pěšák = Pesak
|
Good point, if you try this :
call BJDebugMsg(GetObjectName('hfoo')) What is displayed "Pěšák" or "Pesak" ?
And if you try this :
function test takes nothing returns nothing local string s= GetObjectName ('hfoo') if s== "Pěšák" then call BJDebugMsg ("special characters") endif if s== "Pesak" then call BJDebugMsg ("normal characters") endifendfunction
I know "special" and "normal" are not appropriate, it's just a test anyway.
|
|
|
11-23-2008, 11:23 AM
|
#4 (permalink)
|
WorldEditor Lame'O
Join Date: May 2008
Posts: 101
|
|
|
|
11-23-2008, 12:21 PM
|
#5 (permalink)
|
Anozer jasser
Join Date: Apr 2008
Posts: 237
|
Thx, Darkhunty can you answer plz ?
If you dunno jass just place the function in the personal code window and use a custom script : call Test().
|
|
|
11-23-2008, 12:25 PM
|
#6 (permalink)
|
Low Map Maker
Join Date: Mar 2008
Posts: 89
|
Quote:
Originally Posted by Troll-Brain
Thx, Darkhunty can you answer plz ?
If you dunno jass just place the function in the personal code window and use a custom script : call Test().
|
u asking me what is different in between Pesak and Pěák ?
it is the same but Pěák couldn´nt be wrote in english wc3 because it have diacritical marks and wc3 don´t support it .. then all must write into the scripts pesak
__________________
 This trigger doesn´t work
|
|
|
11-23-2008, 12:58 PM
|
#7 (permalink)
|
Anozer jasser
Join Date: Apr 2008
Posts: 237
|
|
|
|
11-23-2008, 01:13 PM
|
#8 (permalink)
|
User
Join Date: Nov 2008
Posts: 37
|
Russian - "Пехотинец".
By the way, it's good idea to make such func.
|
|
|
11-30-2008, 04:07 PM
|
#9 (permalink)
|
Anozer jasser
Join Date: Apr 2008
Posts: 237
|
Quote:
Originally Posted by Shadow Daemon
Russian - "Пехотинец".
By the way, it's good idea to make such func.
|
I can't write this word in the editor, because of the Cyrillic alphabet, is there an equivalent in the Latin alphabet ?
|
|
|
11-30-2008, 04:46 PM
|
#10 (permalink)
|
User
Join Date: Nov 2008
Posts: 37
|
Unfortunately, no.
As far as I know, Russian symbols have 2 byte length. So the length of "Пехотинец" will be always 18. I doubt that any other language have such long "footman" translated name.
|
|
|
11-30-2008, 05:03 PM
|
#11 (permalink)
|
Spell and Map Moderator
The Helpful Personage
Join Date: Jan 2005
Posts: 4,269
|
Make some funny foot man frenzy distro or AoS and have that function attached to display the data to your player slot. Host it in places like northerend and kalemdor and loderon to get the rest of the names you are after.
Be warned that you will have to use syncronization natives as the string returned is almost garenteed to not be syncronized with everyone so might cause an OOS if used improperly.
|
|
|
11-30-2008, 05:25 PM
|
#12 (permalink)
|
Anozer jasser
Join Date: Apr 2008
Posts: 237
|
Quote:
Originally Posted by Dr Super Good
Make some funny foot man frenzy distro or AoS and have that function attached to display the data to your player slot. Host it in places like northerend and kalemdor and loderon to get the rest of the names you are after.
Be warned that you will have to use syncronization natives as the string returned is almost garenteed to not be syncronized with everyone so might cause an OOS if used improperly.
|
Yeah but it's the ultimate solution :p
Don't worry about synch i've already an idea which work with selecting unit.
Actually the problem is to know all the languages.
|
|
|
12-01-2008, 07:26 PM
|
#13 (permalink)
|
User
Join Date: Dec 2008
Posts: 1
|
|
|
|
12-26-2008, 10:15 PM
|
#14 (permalink)
|
Anozer jasser
Join Date: Apr 2008
Posts: 237
|
Quote:
Originally Posted by Domcho
Soldat is on Italian !
|
Sure, in an other world ...
I tested myself all the european languages on battle.net.
I don't have the asian languages, i tried to host games with no sucess, so i guess i should ask players on asian forums, or maybe battle.net.
Thx to all.
There is the code :
library DetectWarcraftLanguage initializer init globals public constant player DUMMY_PLAYER = Player (12 ) // should be a neutral or computer player public constant integer DUMMY_UNIT_ID = 'hkni' // like you want, but the unit must not have the 'Aloc' ability public constant integer UNIT_ID_FOOTMAN = 'hfoo' // you need a footman rawcode, with the default name, you can use a custom rawcode of courseendglobalsglobals private unit array Ua private string array Players_language private string array Language private group Grp private constant integer LANGUAGES_NUMBER = 14 private constant integer CHINESE_SIMPLIFIED = 1 private constant integer CHINESE_TRADITIONAL = 2 private constant integer CZECH = 3 private constant integer ENGLISH = 4 private constant integer FRENCH = 5 private constant integer GERMAN = 6 private constant integer ITALIAN = 7 private constant integer JAPANESE = 8 private constant integer KOREAN = 9 private constant integer POLISH = 10 private constant integer RUSSIAN = 11 private constant integer SPANISH = 12 private constant integer TAIWANESE = 13 private constant integer UNKNOWN = 0 endglobalsfunction GetWar3Language takes player p returns string return Players_language [GetPlayerId (p )]endfunctionprivate function Conditions takes nothing returns boolean local integer i = GetPlayerId (GetTriggerPlayer ()) local integer j = GetUnitUserData (GetTriggerUnit ()) if not IsUnitInGroup (GetTriggerUnit (),Grp ) then return false endif set Players_language [i ] = Language [j ] return falseendfunctionprivate function DetectLanguage takes nothing returns nothing local string s = StringCase (GetObjectName (UNIT_ID_FOOTMAN ), false) local integer i = StringLength (s ) local integer j = UNKNOWN if SubString (s,3,6 ) == "šák" then set j = CZECH elseif s == "footman" then set j = ENGLISH elseif s == "fantassin" then set j = FRENCH elseif s == "soldat" then set j = GERMAN elseif s == "fante" then set j = ITALIAN elseif s == "piechur" then set j = POLISH elseif i == 18 then set j = RUSSIAN elseif s == "soldado raso" then set j = SPANISH endif call SelectUnit (Ua [j ], true) call SelectUnit (Ua [j ], false)endfunctionprivate function Clear takes nothing returns nothing local integer i = -1 loop set i = i+1 exitwhen i == LANGUAGES_NUMBER call RemoveUnit (Ua [i ]) endloop call GroupClear (Grp ) call DestroyGroup (Grp ) set Grp = null call DestroyTimer (GetExpiredTimer ())endfunctionpublic function init takes nothing returns nothing local integer i = -1 local integer j = -1 local trigger trig = CreateTrigger () local rect map = GetWorldBounds () local real x = GetRectMinX (map ) local real y = GetRectMinY (map ) local timer tim = CreateTimer () set Grp = CreateGroup () loop set i = i+1 exitwhen i == LANGUAGES_NUMBER set Ua [i ]= CreateUnit (DUMMY_PLAYER,DUMMY_UNIT_ID,x,y,0.0 ) call SetUnitX (Ua [i ],x ) call SetUnitY (Ua [i ],y ) call SetUnitUserData (Ua [i ],i ) call GroupAddUnit (Grp,Ua [i ]) endloop set i = -1 loop set i = i+1 exitwhen i == 12 call TriggerRegisterPlayerUnitEvent (trig, Player (i ), EVENT_PLAYER_UNIT_SELECTED, null ) endloop call TriggerAddCondition (trig,Condition (function Conditions )) set Language [UNKNOWN ] = "Unknown" set Language [CHINESE_SIMPLIFIED ] = "Chinese Simplified" set Language [CHINESE_TRADITIONAL ] = "Chinese Traditional" set Language [CZECH ] = "Czech" set Language [ENGLISH ] = "English" set Language [FRENCH ] = "French" set Language [GERMAN ] = "German" set Language [ITALIAN ] = "Italian" set Language [JAPANESE ] = "Japanese" set Language [KOREAN ] = "Korean" set Language [POLISH ] = "Polish" set Language [RUSSIAN ] = "Russian" set Language [SPANISH ] = "Spanish" set Language [TAIWANESE ] = "Taiwanese" call DetectLanguage () call RemoveRect (map ) call TimerStart (tim,1.0, false, function Clear ) set map = null set trig = null set tim = nullendfunctionendlibrary
PS : For some reasons with TESH enabled an "ě" is converted in a "e", that's why i use the SubString function, and with TESH enabled it convert it in two characters, it's enough anyway.
And i can't write the cyrilic letters in the editor (Russian), so i use the length of the string instead.
|
|
|
12-27-2008, 04:51 AM
|
#15 (permalink)
|
User
Join Date: Dec 2008
Posts: 27
|
Are you asking for translations of "footman" in different languages?
I know, 士兵 (pinyin, "Shi bing"), is Chinese for soldier.
Close enough?
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|  |  |  |  |   |  |
|