Menampilkan nama negara browser, hal yang sangat sederhana
Penulis:Eve Cole
Waktu Pembaruan:2009-06-17 17:11:25
<!-- 把下面代码加到<body>区域中 -->
<BAHASA SKRIP="JavaScript">
<!-- Mulai
if (navigator.browserLanguage.substr(0,2) == "af")
document.write('Afrika')
lain jika (navigator.browserLanguage.substr(0,2) == "ar")
{
if (navigator.browserLanguage.substr(3,2) == "ae")
document.write('Arab / Uni Emirat Arab')
lain jika (navigator.browserLanguage.substr(3,2) == "bh")
document.write('Arab / Bahrain')
else if (navigator.browserLanguage.substr(3,2) == "misalnya")
document.write('Arab / Mesir')
lain jika (navigator.browserLanguage.substr(3,2) == "dz")
document.write('Arab / Aljazair')
lain jika (navigator.browserLanguage.substr(3,2) == "iq")
document.write('Arab / Irak')
lain jika (navigator.browserLanguage.substr(3,2) == "jo")
document.write('Arab / Yordania')
lain jika (navigator.browserLanguage.substr(3,2) == "kw")
document.write('Arab / Kuwait')
lain jika (navigator.browserLanguage.substr(3,2) == "lb")
document.write('Arab / Lebanon')
else if (navigator.browserLanguage.substr(3,2) == "ly")
document.write('Arab / Libya')
lain jika (navigator.browserLanguage.substr(3,2) == "ma")
document.write('Arab / Maroko')
lain jika (navigator.browserLanguage.substr(3,2) == "om")
document.write('Arab / Oman')
else if (navigator.browserLanguage.substr(3,2) == "qa")
document.write('Arab / Qatar')
lain jika (navigator.browserLanguage.substr(3,2) == "sa")
document.write('Arab / Arab Saudi')
else if (navigator.browserLanguage.substr(3,2) == "sy")
document.write('Arab / Suriah')
lain jika (navigator.browserLanguage.substr(3,2) == "tn")
document.write('Arab / Tunisia')
else if (navigator.browserLanguage.substr(3,2) == "kamu")
document.write('Arab / Yaman')
else document.write('Arab')
}
else if (navigator.browserLanguage.substr(0,2) == "menjadi")
document.write('Belarusia')
lain jika (navigator.browserLanguage.substr(0,2) == "bg")
document.write('Bulgaria')
lain jika (navigator.browserLanguage.substr(0,2) == "ca")
dokumen.write('Katalan')
lain jika (navigator.browserLanguage.substr(0,2) == "cs")
document.write('Ceko')
lain jika (navigator.browserLanguage.substr(0,2) == "da")
document.write('Denmark')
lain jika (navigator.browserLanguage.substr(0,2) == "de")
{
if (navigator.browserLanguage.substr(3,2) == "at")
document.write('Jerman / Austria')
lain jika (navigator.browserLanguage.substr(3,2) == "ch")
document.write('Jerman / Swiss')
lain jika (navigator.browserLanguage.substr(3,2) == "li")
document.write('Jerman / Liechtenstein')
else if (navigator.browserLanguage.substr(3,2) == "lu")
document.write('Jerman / Luksemburg')
else document.write('Jerman / Jerman')
}
lain jika (navigator.browserLanguage.substr(0,2) == "el")
document.write('Yunani / Yunani')
lain jika (navigator.browserLanguage.substr(0,2) == "en")
{
if (navigator.browserLanguage.substr(3,2) == "kami")
document.write('Bahasa Inggris / Amerika Serikat')
lain jika (navigator.browserLanguage.substr(3,2) == "au")
document.write('Bahasa Inggris / Australia')
lain jika (navigator.browserLanguage.substr(3,2) == "bz")
document.write('Bahasa Inggris / Belize')
lain jika (navigator.browserLanguage.substr(3,2) == "ca")
document.write('Bahasa Inggris / Kanada')
lain jika (navigator.browserLanguage.substr(3,2) == "gb")
document.write('Bahasa Inggris / Inggris Raya')
else if (navigator.browserLanguage.substr(3,2) == "ie")
document.write('Bahasa Inggris / Irlandia')
lain jika (navigator.browserLanguage.substr(3,2) == "jm")
document.write('Bahasa Inggris / Jamaika')
lain jika (navigator.browserLanguage.substr(3,2) == "nz")
document.write('Bahasa Inggris / Selandia Baru')
lain jika (navigator.browserLanguage.substr(3,2) == "tt")
document.write('Bahasa Inggris / Trinidad')
else if (navigator.browserLanguage.substr(3,2) == "za")
document.write('Bahasa Inggris / Afrika Selatan')
else document.write('Bahasa Inggris')
}
lain jika (navigator.browserLanguage.substr(0,2) == "es")
{
if (navigator.browserLanguage.substr(3,2) == "ar")
document.write('Spanyol / Argentina')
lain jika (navigator.browserLanguage.substr(3,2) == "bo")
document.write('Spanyol / Bolivia')
lain jika (navigator.browserLanguage.substr(3,2) == "cl")
document.write('Spanyol / Chili')
lain jika (navigator.browserLanguage.substr(3,2) == "co")
document.write('Spanyol / Kolombia')
lain jika (navigator.browserLanguage.substr(3,2) == "cr")
document.write('Spanyol / Kosta Rika')
lain jika (navigator.browserLanguage.substr(3,2) == "lakukan")
document.write('Spanyol / Republik Dominika')
lain jika (navigator.browserLanguage.substr(3,2) == "ec")
document.write('Spanyol / Ekuador')
lain jika (navigator.browserLanguage.substr(3,2) == "gt")
document.write('Spanyol / Guatemala')
lain jika (navigator.browserLanguage.substr(3,2) == "hn")
document.write('Spanyol / Honduras')
lain jika (navigator.browserLanguage.substr(3,2) == "mx")
document.write('Spanyol / Meksiko')
lain jika (navigator.browserLanguage.substr(3,2) == "ni")
document.write('Spanyol / Nikaragua')
lain jika (navigator.browserLanguage.substr(3,2) == "pa")
document.write('Spanyol / Panama')
lain jika (navigator.browserLanguage.substr(3,2) == "pe")
document.write('Spanyol / Peru')
lain jika (navigator.browserLanguage.substr(3,2) == "pr")
document.write('Spanyol / Puerto Riko')
lain jika (navigator.browserLanguage.substr(3,2) == "py")
document.write('Spanyol / Paraguay')
lain jika (navigator.browserLanguage.substr(3,2) == "sv")
document.write('Spanyol / El Salvador')
lain jika (navigator.browserLanguage.substr(3,2) == "uy")
document.write('Spanyol / Uruguay')
else if (navigator.browserLanguage.substr(3,2) == "ve")
document.write('Spanyol / Venezuela')
else document.write('Spanyol / Spanyol')
}
lain jika (navigator.browserLanguage.substr(0,2) == "et")
document.write('Bahasa Estonia')
else if (navigator.browserLanguage.substr(0,2) == "eu")
dokumen.write('Basque')
lain jika (navigator.browserLanguage.substr(0,2) == "fa")
document.write('Farsi')
lain jika (navigator.browserLanguage.substr(0,2) == "fi")
document.write('Finlandia')
else if (navigator.browserLanguage.substr(0,2) == "fo")
document.write('Bahasa Faero')
lain jika (navigator.browserLanguage.substr(0,2) == "fr")
{
if (navigator.browserLanguage.substr(3,2) == "menjadi")
document.write('Perancis / Belgia')
lain jika (navigator.browserLanguage.substr(3,2) == "ca")
document.write('Perancis / Kanada')
lain jika (navigator.browserLanguage.substr(3,2) == "ch")
document.write('Perancis / Swiss')
lain jika (navigator.browserLanguage.substr(3,2) == "ca")
document.write('Perancis / Luksemburg')
else document.write('Perancis/Perancis')
}
lain jika (navigator.browserLanguage.substr(0,2) == "gd")
{
if (navigator.browserLanguage.substr(3,2) == "ie")
document.write('Gaelik / Irlandia')
else document.write('Gaelik / Skotlandia')
}
else if (navigator.browserLanguage.substr(0,2) == "he")
document.write('Ibrani')
else if (navigator.browserLanguage.substr(0,2) == "hai")
dokumen.write('Hindi')
else if (navigator.browserLanguage.substr(0,2) == "jam")
document.write('Kroasia')
else if (navigator.browserLanguage.substr(0,2) == "hu")
document.write('Hongaria')
lain jika (navigator.browserLanguage.substr(0,2) == "dalam")
document.write('Bahasa Indonesia')
lain jika (navigator.browserLanguage.substr(0,2) == "adalah")
document.write('Islandia')
else if (navigator.browserLanguage.substr(0,2) == "he")
document.write('Ibrani')
lain jika (navigator.browserLanguage.substr(0,2) == "itu")
{
if (navigator.browserLanguage.substr(3,2) == "ch")
document.write('Italia / Swiss')
else document.write('Italia / Italia')
}
lain jika (navigator.browserLanguage.substr(0,2) == "ja")
document.write('Bahasa Jepang / Jepang')
lain jika (navigator.browserLanguage.substr(0,2) == "ji")
document.write('Bahasa Yiddish')
else if (navigator.browserLanguage.substr(0,2) == "ko")
document.write('Bahasa Korea / Korea')
lain jika (navigator.browserLanguage.substr(0,2) == "lt")
document.write('Lithuania / Lituania')
lain jika (navigator.browserLanguage.substr(0,2) == "lv")
document.write('Latvia')
lain jika (navigator.browserLanguage.substr(0,2) == "mk")
document.write('Makedonia / Makedonia')
lain jika (navigator.browserLanguage.substr(0,2) == "ms")
document.write('Malaysia / Malaysia')
lain jika (navigator.browserLanguage.substr(0,2) == "mt")
document.write('Malta / Malta')
lain jika (navigator.browserLanguage.substr(0,2) == "nl")
{
if (navigator.browserLanguage.substr(3,2) == "menjadi")
document.write('Belanda / Belgia')
else document.write('Belanda / Belanda')
}
lain jika (navigator.browserLanguage.substr(0,2) == "pl")
document.write('Polandia / Polandia')
lain jika (navigator.browserLanguage.substr(0,2) == "pt")
{
if (navigator.browserLanguage.substr(3,2) == "br")
document.write('Portugis / Brasil')
else document.write('Bahasa Portugis / Portugis')
}
lain jika (navigator.browserLanguage.substr(0,2) == "rm")
document.write('Rhaeto-Romanic / Rumania')
lain jika (navigator.browserLanguage.substr(0,2) == "ro")
document.write('Rumania / Rumania')
lain jika (navigator.browserLanguage.substr(0,2) == "ru")
document.write('Rusia / Rusia')
lain jika (navigator.browserLanguage.substr(0,2) == "sb")
dokumen.write('Sorbian')
lain jika (navigator.browserLanguage.substr(0,2) == "sk")
document.write('Bahasa Slowakia')
lain jika (navigator.browserLanguage.substr(0,2) == "sl")
document.write('Bahasa Slovenia')
else if (navigator.browserLanguage.substr(0,2) == "sq")
document.write('Bahasa Albania / Albania')
lain jika (navigator.browserLanguage.substr(0,2) == "sr")
document.write('Serbia / Serbia')
lain jika (navigator.browserLanguage.substr(0,2) == "sv")
{
if (navigator.browserLanguage.substr(3,2) == "fi")
document.write('Swedia / Finlandia')
else document.write('Swedia / Swedia')
}
lain jika (navigator.browserLanguage.substr(0,2) == "sx")
dokumen.write('Sutu')
lain jika (navigator.browserLanguage.substr(0,2) == "sz")
dokumen.write('Sami')
lain jika (navigator.browserLanguage.substr(0,2) == "th")
document.write('Thai / Thailand')
lain jika (navigator.browserLanguage.substr(0,2) == "tn")
dokumen.write('Tswana')
lain jika (navigator.browserLanguage.substr(0,2) == "tr")
document.write('Turki / Turki')
lain jika (navigator.browserLanguage.substr(0,2) == "ts")
dokumen.write('Tsonga')
else if (navigator.browserLanguage.substr(0,2) == "uk")
document.write('Ukraina')
lain jika (navigator.browserLanguage.substr(0,2) == "th")
document.write('Thai / Thailand')
else if (navigator.browserLanguage.substr(0,2) == "ur")
dokumen.write('Urdu')
else if (navigator.browserLanguage.substr(0,2) == "ve")
dokumen.write('Venda')
lain jika (navigator.browserLanguage.substr(0,2) == "vi")
document.write('Bahasa Vietnam / Vietnam')
lain jika (navigator.browserLanguage.substr(0,2) == "xh")
dokumen.write('Xhosa')
lain jika (navigator.browserLanguage.substr(0,2) == "zh")
{
if (navigator.browserLanguage.substr(3,2) == "cn")
document.write('Cina / Cina')
lain jika (navigator.browserLanguage.substr(3,2) == "hk")
document.write('Cina / Hong Kong')
lain jika (navigator.browserLanguage.substr(3,2) == "sg")
document.write('Cina / Singapura')
lain jika (navigator.browserLanguage.substr(3,2) == "tw")
document.write('Cina / Taiwan')
else document.write('Cina / Cina')
}
else if (navigator.browserLanguage.substr(0,2) == "zu")
dokumen.write('Zulu')
kalau tidak
document.write('Tidak dapat ditentukan')
// Berakhir -->
</skrip>