blob: 32e0f7bc3c6c1b2e9ef245fcf372228da14ee9b6 (
plain) (
tree)
|
|
// TMW2 script
// Evol functions.
// Author:
// Reid, Jesusalva
// Description:
// Function setting the player language
function script languagecode {
switch (Lang) {
case LANG_PTBR:
return "pt_BR";
case LANG_FR:
return "fr";
case LANG_DE:
return "de";
case LANG_ES:
return "es";
default:
return "en";
}
}
function script asklanguage {
dispbottom col("We need help with translations. [@@help://translate|Learn more@@]", 1);
switch (getarg(0, LANG_IN_SHIP))
{
case LANG_ON_SEA:
setarray .@messages$[0], "I hear you... (English)", // English
"Eu te ouço... (Português)", // Portuguese
"Je vous entends... (Français)", // French
"Ich höre euch... (Deutsch)", // German
"Te oigo... (Español)"; // Spanish
break;
case LANG_IN_SHIP:
setarray .@messages$[0], "I speak English.", // English
"Eu falo Português.", // Portuguese
"Je parle français.", // French
"Ich spreche Deutsch.", // German
"Hablo Español."; // Spanish
break;
default:
return;
}
setarray .@flags$[0], "flags/en",
"flags/pt_BR",
"flags/fr",
"flags/de",
"flags/es";
.@menustr$ = "";
.@separator$ = ":";
for (.@i = 0; .@i <= MAX_LANG; .@i++)
{
if (.@i == MAX_LANG) {
.@separator$ = "";
}
.@menustr$ = .@menustr$ + .@flags$[.@i] + "|" + .@messages$[.@i] + .@separator$;
}
select(.@menustr$);
.@lang = @menu - 1;
if (.@lang >= 0 || .@lang <= MAX_LANG) {
Lang = .@lang;
}
return;
}
|