views:

549

answers:

1

Hi,

I would like to know the relation between multilingual website and font installed at client PC.

sUPPOSE I have one multilingual website having resources in following languages english(uk), swedish(sweden) and say hindi(India) etc.

When client open this website from different geographical area and doesn't have some of the font (swedish, hindi) at their PC. Now i would like to know that

  1. Does website text will visible in all the languages or not?
  2. Is there any relation between operating system, browser and font for visibility of multilingual website?
  3. In what possible scenario the website is visible with distorted text?
A: 

The browser tells the server which languages it is accepting via the HTTP variable HTTP_ACCEPT_LANGUAGE, which the server retrieves via

Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"]

The server may adjust its output accordingly, or ignore the variable.

Apart from this, the relation you are looking for is depending entirely on the browser implementation:

  • extract the language setting from the received HTTP/HTML content (*)

  • usually the language is mapped to a Unicode range

  • find a font from the browser/user settings mapping Unicode ranges to (preferred) fonts

  • output text with the font (via OS API)

(*) HTML tags may have a lang="language code" attribute which overrides the HTML/HTTP language

However the OS may find that some characters are not covered by the selected font, and may choose a fallback font (see UniScribe glossary and the Sorting It All Out blog here and here)

IMO if the browser sends an Accept-Language to the server, you should be allowed to assume that the browser knows how to correctly display the content.

devio
@devio, thanks for wonderful information. I have few questions against your reply.1. I am not getting about fallback font. How it works?2. what is IMO? Does browser send accept language inside header?
Hemant Kothiyal
1) font fallback (from glossary): "Font fallback is automated selection of a font other than the font selected by the user in an application. In Uniscribe, font fallback is applied when all or part of the text is in a script that the user-selected font does not support." 2) IMO = "in my opinion" 3) Accept-Language is sent by the browser in the HTTP header
devio
Note that UniScribe is Windows-specific. Other OSes implement their own mechanisms, or none at all.
devio