Troll-Brain
You can change this now in User CP.
- Reaction score
- 85
Nice floodI've seen a map have 7 different languages, they just had to pick their language at start-up.
+ rep
Nice floodI've seen a map have 7 different languages, they just had to pick their language at start-up.
Well do that then.How can i ask it clearer ?
I don't want the result of a translator, but the result of this :GetObjectName('hfoo') , for all languages of warcraft 3.
I guess i should host myself an edited footman and use banlist to know the answers ...
...Greece doesn't even use those letters...:thdown:Greek = footman
Swedish = footman
Amazing online translator skills.sorry for double post
english = Footman
French = fantassin
German = Lakai
Itialian = fante
Portuguese = footman
Spanish = lacayo
Russian = лакей
Dutch = lakei
Greek = footman
Swedish = footman
Arabic =[فووتمن]
japanese = 従僕
Korean = 하인
Chinese Simplified = 脚夫
Chinese Traditional = 腳夫
----------------------------------------------------
can i get +rep for this please :shades:
Amazing online translator skills.
He was being sarcastic.Thank You just like to help out
He was being sarcastic.
Translated names are quite useless, and usually wrong.
I just tested on Google Translate.
English > German.
"Footman" > "Lakai"
That's obviously incorrect, as the actual name is "Soldat"
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 = 039;hkni039; // like you want, but the unit must not have the 'Aloc' ability
public constant integer UNIT_ID_FOOTMAN = 039;hfoo039; // 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</i></i></i></i></i></i></i>
Hmm my english is so crappy, but the max size of a thread title is also so shortYou sure that title makes more sense than the current one?