• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Name of 'hfoo' in all languages ?

Status
Not open for further replies.
Level 17
Joined
Apr 27, 2008
Messages
2,455
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 ? (F12)
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.
 

Attachments

  • DetectLanguage.w3m
    16.2 KB · Views: 82
Last edited:
Level 17
Joined
Apr 27, 2008
Messages
2,455
czech is that Pěšák = Pesak
Good point, if you try this :
JASS:
call BJDebugMsg(GetObjectName('hfoo'))
What is displayed "Pěšák" or "Pesak" ?

And if you try this :

JASS:
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")
   endif
endfunction

I know "special" and "normal" are not appropriate, it's just a test anyway.
 
Level 4
Joined
Mar 12, 2008
Messages
89
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
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
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.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
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.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
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 :

JASS:
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 course
endglobals
    
globals
    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
endglobals
      
    
function GetWar3Language takes player p returns string
    return Players_language[GetPlayerId(p)]
endfunction

private 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 false
endfunction

private 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)
    
endfunction

private 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())
endfunction

public 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 = null
endfunction
    
endlibrary

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.
 
Level 2
Joined
Dec 25, 2008
Messages
11
Are you asking for translations of "footman" in different languages?
I know, 士兵 (pinyin, "Shi bing"), is Chinese for soldier.
Close enough?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Blizzard Support

So i thought that was different for Chinese Traditional, Simplified and Taiwainese, but it seems they speak Chinese Traditional in Taiwan.

Ofc i already tried to ask it in other forums, but most of the answers were a translation, not what it is really in warcraft3.

I add a map in the first post, plz test it and take screenshots of the box messages (24 localized strings will be displayed)
 
Last edited:
Level 17
Joined
Apr 27, 2008
Messages
2,455
Since i can't write in the editor the russian and chinese letters, i need to play with the strings lengths.

I have attached a test map in the first post.
Just test the map and takes screenshots of the box messages (24 localized strings will be displayed).

If i get the localized strings of all warcraft3 languages, i should no need anymore the requirement of an footman unit with the default name.

Plz help me.
Thx in advance.

Also could a moderator change the title of the thread to this one, plz :
"Need an international help, test the map attached , for help me to make a function"
 
Status
Not open for further replies.
Top