(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Gamer's Hub > Warcraft Discussion

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.

Reply
 
LinkBack Thread Tools Display Modes
Old 11-22-2008, 10:17 PM   #1 (permalink)

Anozer jasser
 
Join Date: Apr 2008
Posts: 237

Troll-Brain has little to show at this moment (13)Troll-Brain has little to show at this moment (13)


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.
Attached Files
File Type: w3m DetectLanguage.w3m (16.2 KB, 1 views)

Last edited by Troll-Brain; 12-28-2008 at 12:42 PM..
Troll-Brain is offline   Reply With Quote
Old 11-22-2008, 10:19 PM   #2 (permalink)
 
Darkhunty's Avatar

Low Map Maker
 
Join Date: Mar 2008
Posts: 89

Darkhunty has little to show at this moment (3)


czech is that Pěšák = Pesak
__________________
This trigger doesn´t work
Darkhunty is offline   Reply With Quote
Old 11-22-2008, 10:37 PM   #3 (permalink)

Anozer jasser
 
Join Date: Apr 2008
Posts: 237

Troll-Brain has little to show at this moment (13)Troll-Brain has little to show at this moment (13)


Quote:
Originally Posted by Darkhunty View Post
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")
   endif
endfunction

I know "special" and "normal" are not appropriate, it's just a test anyway.
Troll-Brain is offline   Reply With Quote
Old 11-23-2008, 11:23 AM   #4 (permalink)
 
Dagguh's Avatar

WorldEditor Lame'O
 
Join Date: May 2008
Posts: 101

Dagguh has little to show at this moment (10)Dagguh has little to show at this moment (10)


Polish: Piechur
Dagguh is offline   Reply With Quote
Old 11-23-2008, 12:21 PM   #5 (permalink)

Anozer jasser
 
Join Date: Apr 2008
Posts: 237

Troll-Brain has little to show at this moment (13)Troll-Brain has little to show at this moment (13)


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().
Troll-Brain is offline   Reply With Quote
Old 11-23-2008, 12:25 PM   #6 (permalink)
 
Darkhunty's Avatar

Low Map Maker
 
Join Date: Mar 2008
Posts: 89

Darkhunty has little to show at this moment (3)


Quote:
Originally Posted by Troll-Brain View Post
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
Darkhunty is offline   Reply With Quote
Old 11-23-2008, 12:58 PM   #7 (permalink)

Anozer jasser
 
Join Date: Apr 2008
Posts: 237

Troll-Brain has little to show at this moment (13)Troll-Brain has little to show at this moment (13)


Ok,thx.
Troll-Brain is offline   Reply With Quote
Old 11-23-2008, 01:13 PM   #8 (permalink)
 
Shadow Daemon's Avatar

User
 
Join Date: Nov 2008
Posts: 37

Shadow Daemon has little to show at this moment (11)Shadow Daemon has little to show at this moment (11)


Russian - "Пехотинец".
By the way, it's good idea to make such func.
Shadow Daemon is offline   Reply With Quote
Old 11-30-2008, 04:07 PM   #9 (permalink)

Anozer jasser
 
Join Date: Apr 2008
Posts: 237

Troll-Brain has little to show at this moment (13)Troll-Brain has little to show at this moment (13)


Quote:
Originally Posted by Shadow Daemon View Post
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 ?
Troll-Brain is offline   Reply With Quote
Old 11-30-2008, 04:46 PM   #10 (permalink)
 
Shadow Daemon's Avatar

User
 
Join Date: Nov 2008
Posts: 37

Shadow Daemon has little to show at this moment (11)Shadow Daemon has little to show at this moment (11)


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.
Shadow Daemon is offline   Reply With Quote
Old 11-30-2008, 05:03 PM   #11 (permalink)
Spell and Map Moderator
 
Dr Super Good's Avatar

The Helpful Personage
 
Join Date: Jan 2005
Posts: 4,269

Dr Super Good is a name known to all (691)Dr Super Good is a name known to all (691)Dr Super Good is a name known to all (691)Dr Super Good is a name known to all (691)


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.
Dr Super Good is offline   Reply With Quote
Old 11-30-2008, 05:25 PM   #12 (permalink)

Anozer jasser
 
Join Date: Apr 2008
Posts: 237

Troll-Brain has little to show at this moment (13)Troll-Brain has little to show at this moment (13)


Quote:
Originally Posted by Dr Super Good View Post
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.
Troll-Brain is offline   Reply With Quote
Old 12-01-2008, 07:26 PM   #13 (permalink)

User
 
Join Date: Dec 2008
Posts: 1

Domcho is an unknown quantity at this point (0)


Soldat is on Italian !
Domcho is offline   Reply With Quote
Old 12-26-2008, 10:15 PM   #14 (permalink)

Anozer jasser
 
Join Date: Apr 2008
Posts: 237

Troll-Brain has little to show at this moment (13)Troll-Brain has little to show at this moment (13)


Quote:
Originally Posted by Domcho View Post
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 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.
Troll-Brain is offline   Reply With Quote
Old 12-27-2008, 04:51 AM   #15 (permalink)

User
 
Join Date: Dec 2008
Posts: 27

Arariel has little to show at this moment (1)


Are you asking for translations of "footman" in different languages?
I know, 士兵 (pinyin, "Shi bing"), is Chinese for soldier.
Close enough?
Arariel is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[JASS] Encorporating other languages into jass Braiden Triggers & Scripts 5 06-01-2007 05:20 PM
How many languages do you speak? eeevil Off-Topic 25 08-11-2005 08:55 PM

All times are GMT. The time now is 05:51 AM.






Your link here 
Loan | Cheap Loan | Loans | Mobile Phone | Problem Mortgage