Re: [PATCH] http: Add Accept-Language header if possible
- From
Jeff King <peff@peff.net>
- Date
- Jul 9, 2014, 05:10 UTC
- Message-ID
- <20140709051040.GB2318@sigill.intra.peff.net>
- In-Reply-To
- <1404834846-11812-1-git-send-email-eungjun.yi@navercorp.com>
On Wed, Jul 09, 2014 at 12:54:06AM +0900, Yi EungJun wrote:
Show 13 quoted lines
> From: Yi EungJun <eungjun.yi@navercorp.com> > > Add an Accept-Language header which indicates the user's preferred > languages defined by 'LANGUAGE' environment variable if the variable is > not empty. > > Example: > LANGUAGE= -> "" > LANGUAGE=ko -> "Accept-Language: ko; q=1.000, *; q=0.001" > LANGUAGE=ko:en -> "Accept-Language: ko; q=1.000, en; q=0.999, *; q=0.001" > > This gives git servers a chance to display remote error messages in > the user's preferred language.
Should this also take into account other language-related variables? I'd think $LC_ALL, $LC_MESSAGES, and $LANG would affect it, too. Are colon-separated values a standard in $LANGUAGE? I have never seen them, but I admit I am not very knowledgeable about localization issues.
Also, we do we need to do more parsing? My $LANG is set to en_US.UTF-8. The encoding part is presumably uninteresting to the remote server. I also wonder if there are support functions in libc or as part of gettext that can help us get these values.
-Peff