Web Hosting Talk







View Full Version : Tell browser to install lang pack - HOW?


Abu Mami
12-17-2001, 01:59 AM
Hi,

Someone mentioned a Turkish domain name registrar (for some reason, the forum doesn't allow me to post the name?) here on the forums as a good low cost registrar. Low cost - yes. Good - don't know, they still haven't answered my email.

Anyhow, when I went to their site, my browser asked me if I wanted to install the Turkish language pack. I clicked on NO since my Turkish is a little rusty :-), but I would like to know how this is done. That it, how does the site cause this to happen? Is this an HTML tag? Javascript? ASP? PHP? I would like to support different languages on my site, and it would be nice if I could force the browser to prompt the user to install the lang pack. Makes it easier for the user to figure out what's going on, and they can always say no if they want.

Any help would be appreciated.

Thanks

Varun Shoor
12-17-2001, 02:38 PM
It is done via meta tags I think but I might be wrong. :)

Abu Mami
12-18-2001, 01:35 AM
Originally posted by VarunShoor
It is done via meta tags I think but I might be wrong. :)

I suspected as much, but I've searched with every search engine, and scoured every HTML/scripting site I could find and have come up with nothing on this. I can't believe that this is such an obscure subject.

Anyhow, thanks. I'll try to do a little light reading on meta tags.

bobcares
12-18-2001, 03:51 PM
HI!
I guess you are looking for dynamic fonts.
Our development team had made a Japanese site once. We used dynamic fonts for that purpose.
Here's the code for cross browser compatibility.



if (navigator.appName == "Netscape")

document.write ("<link rel=?fontdef? src=?http://yourserver.com/YourCoolFont.pfr?>");

else

{

document.write (?<style type="text/css">?);

document.write (? @font-face {?);

document.write (? font-family: Webdunia?+"\;");

document.write (? font-style: normal?+"\;");

document.write (? font-weight: normal?+"\;");

document.write (? src: url("http://yourserver.com/YourCoolFont.pfr?)?);

document.write (?}?);

document.write (?</style>?);

}



Note that Navigator uses the PFR (Portable Font Resource) format, IE uses EOT (Embedded Open Type) files.

I hope this helps.


Have a great day :)

regards
amar

bitserve
12-18-2001, 04:32 PM
I thought that MSIE would automatically download the characterset if it needed to. All you need to do is put the following in your HTML:

<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=XXXX">

Where XXXX is the character set.