Comment 75 for bug 10910

Revision history for this message
In , Sebastian J. Bronner (waschtl) wrote :

(In reply to comment #25)
> My original proposal above, from 2002-05-27, namely to decide on preferred
> units of measurement and standard paper size by searching for country codes in
> the LC_* environment variables (exactly as suggested in the above piece of
> code) is IMHO still the most advisable solution today! Please just try it,
> before thinking up alternatives.

My proposol for implementation is to check for the proper paper size setting by stepping through the following items. The first successfully determined value would be used:

1 - if it exists, use a firefox-specific setting
    stored in the user's firefox profile
2 - infer paper size from LC_ALL
3 - infer paper size from LC_PAPER
4 - infer paper size from LANG
5 - if it exists, read paper size from /etc/papersize
6 - retrieve paper size from cups (if that is possible)
7 - default to a4

Comments?

I have left LC_MEASUREMENT out of this list purposely because it really has no direct bearing on paper. A user may wish to specify different measurement units, but wouldn't expect his locale's paper size to change because of that.

Step 1 - the firefox-specific setting is for users who don't care about user profiles. The user would be able to make a choice in a dialog between a specific paper size and "locale default" (or similar). This would be set to "locale default" unless the user specifically changes it.