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.
Japanese Preferred ML
language_preference_order variable controls the behaviour.
By default, an ML for Japanese is configured as
language_preference_order = ja en
&fml8; uses this hint.
Accept-Language: ja, en
&fml8; returns the message only in Japanese.
Accept-Language: en
&fml8; returns the message only in English.
no Accept-Language:, Content-Type: charset=iso-2022-jp
&fml8; returns the message only in Japanese.
no Accept-Language:, Content-Type: charset=us-ascii
We cannot determine the language.
We should return the message in both English and Japanese.
no Accept-Language:, no Content-Type:
We cannot determine the language.
We should return the message in both English and Japanese.
English preferred ML
By default, a ML for English people is configured as
language_preference_order = en
&fml8; uses this hints.
Accept-Language: ja, en
&fml8; returns the message only in Japanese.
Accept-Language: en
&fml8; returns the message only in English.
no Accept-Language:, Content-Type: charset=iso-2022-jp
&fml8; returns the message only in Japanese.
no Accept-Language:, Content-Type: charset=us-ascii
&fml8; returns the message only in English.
no Accept-Language:, no Content-Type:
&fml8; returns the message only in English.