Language Preference In Processing

fml 8 tutorial
Prev |  | Next

# Chapter 33. Language Preference In Processing

# Problems Of Language Preference

The simplest model is that we suppose we should return the japanese message when the ML is configured as for Japanese. This model needs that the language of a ML is fixed. This ML always returns the error message in Japanese.

However, it is not proper to ignore Accept-Language: header field since some Japanese people cannot read Japanese on the screen. There may be invalid Accept-Language: field. There are several problems.

For example, if "Accept-Language: ja" is given, we can recognize the language is "ja". However, how about the case Japanese send a mail with the body content "help" (English) ? In that case we cannot determine we should return the reply in us-ascii or iso-2022-jp. For example, how about the following example ?

    [Example]

    From: rudo@example.co.jp
    Subject: help
    mime-version: 1.0
    content-type: text/plain; charset=us-ascii

    help

We should return the English reply message based on charset information since this message contains English only, so charset is us-ascii. But in this case we should return Japanese message since the sender is a Japanese. So we should return the help message in both English and Japanese if the ML is configured as Japanese preferrable. If English is preferrable, the reply is English only.

If Accept-Lanaguage: is specified, we prefer it. Even if the ML is English preferrable (config: language_preference_order = en) and the message with "Accept-Lanaguage: ja" is given, the ML returns the Japanese help message. fml8 behaves like it.

Prev | Home | Next
recipes | Up | Japanese Preferred ML

fml 8.0 (fml-devel) project homepage is www.fml.org/software/fml8/.
fml 4.0 project homepage is www.fml.org/software/fml4/.
about one floppy bsd routers, see www.bsdrouter.org/.
other free softwares are found at www.fml.org/software/.

author's homepage is www.fml.org/home/fukachan/.
Also, visit nuinui's world :) at www.nuinui.net.

For questions about FML, e-mail <fml-bugs@fml.org>.