trBigMap

By enkh Last update Feb 8, 2010 — Installed 14,123 times.

Translation

in
Subscribe to Translation 2 posts, 2 voices



MMX User
FirefoxWindows

add this strings to script:

// Selecting language
Xlang="com";
checkLang();

/**
 * Updates the Xlang variable, which is used in language initialization.
 */	
function checkLang()
{
  var host = window.location.hostname;
  hosts = host.split(".");
  Xlang = hosts[hosts.length-1];
}

var Lang = new Array();
//// Translation strings ////
switch (Xlang) {
	case "ru":
	  Lang['BigMap']="Большая карта";
	  Lang['Village']="Деревня";
	  Lang['Player']="Игрок";
	  Lang['Population']="Население";
	  Lang['Alliance']="Альянс";
        break;
default:
  Lang['BigMap']="BigMap";
  Lang['Village']="Village";
  Lang['Player']="Player";
  Lang['Population']="Population";
  Lang['Alliance']="Alliance";
}

replace strings in script:
in var Board
  link.innerHTML = Lang['BigMap'] + " " + given_size;

and in var Map
if (box.length > 6){
	Dhtml += "<tr>";
		Dhtml += "<td>"+Lang['Village']+"</td>";
		Dhtml += "<td style='width: 200px;'>"+box[6].split('"')[1]+"</td>";
	Dhtml += "</tr>";
	Dhtml += "<tr>";
		Dhtml += "<td>"+Lang['Player']+"</td>";
		Dhtml += "<td style='width: 200px;'  >"+box[7].split('"')[1]+"</td>";
	Dhtml += "</tr>";
	Dhtml += "<tr>";
		Dhtml += "<td>"+Lang['Population']+"</td>";
		Dhtml += "<td style='width: 200px;' >"+box[8].split('"')[1]+"</td>";
	Dhtml += "</tr>";
	Dhtml += "<tr>";
		Dhtml += "<td>"+Lang['Alliance']+"</td>";
		Dhtml += "<td style='width: 200px;' >"+box[9].split('"')[1]+"</td>";
	Dhtml += "</tr>";
}

and you give Russian and English language :D
You can easy add more language ;)

 
georgjesen User
FirefoxWindows

Dear Sir,

If i want to display Chinese Characters, what should i do? Thanks.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel