Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Note: since Git 2.3.1+ (Q1/Q2 2015), Git will add Accept-Language header if possible.<br> See <a href="https://github.com/git/git/commit/f18604bbf2c391c689a41fca14cbaeff5e106255" rel="nofollow noreferrer">commit f18604b</a> by <a href="https://github.com/npcode" rel="nofollow noreferrer">Yi EungJun (<code>npcode</code>)</a></p> <blockquote> <p>Add an <code>Accept-Language</code> header which indicates the user's preferred languages defined by <code>$LANGUAGE</code>, <code>$LC_ALL</code>, <code>$LC_MESSAGES</code> and <code>$LANG</code>.</p> <p>This gives git servers a chance to display remote error messages in the user's preferred language.</p> </blockquote> <hr> <p>You have <a href="https://stackoverflow.com/questions/6089435/git-gui-how-to-change-the-locale">locale for git gui</a> or <a href="https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools" rel="nofollow noreferrer">other GUIs</a>, <del>but not for the command-line, considering it was one of the questions of <a href="https://git.wiki.kernel.org/index.php/GitSurvey2010" rel="nofollow noreferrer">GitSurvey 2010</a></del></p> <pre><code>localization of command-line messages (i18n) 258 3.6% </code></pre> <p>Of course, since 2010, as <strong><a href="https://github.com/git/git/blob/master/po/README" rel="nofollow noreferrer"><code>po/README</code></a></strong> describes: </p> <blockquote> <p>Before strings can be translated they first have to be marked for translation.</p> <p><strong>Git uses an internationalization interface that wraps the system's <a href="http://www.gnu.org/software/gettext/" rel="nofollow noreferrer"><code>gettext</code></a> library</strong>, so most of the advice in your gettext documentation (on GNU systems <code>info gettext</code> in a terminal) applies.</p> </blockquote> <p>In place since <a href="https://github.com/git/git/blob/master/Documentation/RelNotes/1.7.9.txt" rel="nofollow noreferrer">git 1.7.9+</a> (January 2012):</p> <blockquote> <p><strong>Git uses <code>gettext</code> to translate its most common interface messages into the user's language if translations are available and the locale is appropriately set</strong>.<br> Distributors can drop new <code>PO</code> files in <code>po/</code> to add new translations.</p> </blockquote> <p>So, if your update has mess up the translation, check what <code>gettext</code> uses:<br> See, for instance, "<a href="http://www.gnu.org/software/gettext/manual/gettext.html#Locale-Environment-Variables" rel="nofollow noreferrer">Locale Environment Variables</a>"</p> <blockquote> <p>A locale is composed of several locale categories, see Aspects. When a program looks up locale dependent values, it does this according to the following environment variables, in priority order:</p> </blockquote> <pre><code>LANGUAGE LC_ALL LC_xxx, according to selected locale category: LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, ... LANG </code></pre> <blockquote> <p>Variables whose value is set but is empty are ignored in this lookup.</p> <p><code>LANG</code> is the normal environment variable for specifying a locale. As a user, you normally set this variable (unless some of the other variables have already been set by the system, in <code>/etc/profile</code> or similar initialization files).</p> <p><code>LC_CTYPE</code>, <code>LC_NUMERIC</code>, <code>LC_TIME</code>, <code>LC_COLLATE</code>, <code>LC_MONETARY</code>, <code>LC_MESSAGES</code>, and so on, are the environment variables meant to override <code>LANG</code> and affecting a single locale category only.<br> For example, assume you are a Swedish user in Spain, and you want your programs to handle numbers and dates according to Spanish conventions, and only the messages should be in Swedish. Then you could create a locale named ‘<code>sv_ES</code>’ or ‘<code>sv_ES.UTF-8</code>’ by use of the <code>localedef</code> program. But it is simpler, and achieves the same effect, to set the <code>LANG</code> variable to <code>es_ES.UTF-8</code> and the <code>LC_MESSAGES</code> variable to <code>sv_SE.UTF-8</code>; these two locales come already preinstalled with the operating system.</p> <p><code>LC_ALL</code> is an environment variable that overrides all of these. It is typically used in scripts that run particular programs. For example, configure scripts generated by GNU <code>autoconf</code> use <code>LC_ALL</code> to make sure that the configuration tests don't operate in locale dependent ways.</p> <p>Some systems, unfortunately, set <code>LC_ALL</code> in <code>/etc/profile</code> or in similar initialization files. As a user, you therefore have to unset this variable if you want to set <code>LANG</code> and optionally some of the other <code>LC_xxx</code> variables. </p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload