Locale Settings

From GnuCash
Revision as of 00:45, 11 January 2011 by Fell (talk | contribs) (System settings: add wikipedia links)
Jump to: navigation, search

While Gnucash was written in american english, there are many translations available. This page shows, how to select them.

System settings

In general GnuCash uses the system settings of your computer. So the control center for system settings should be your first choice to adjust them. But there are some cases, e.g. as a translator, where you wish to tweak them. Usually this is done by setting the localeenvironment variables, but the How depends on your operating system.

LANG vs LANGUAGE

It may be that both variables are not always required. It depends on the system. It does no harm to set both of them and this ensures that the language is really set.

LANGUAGE sets the language of the program surface.

LANG sets a whole bunch of other LC_ variables, which you can always check, at least under Linux, by running locale. This setting affects also beneath others

  • the default currency,
  • available account templates.

So if you understand spanish better than english, but wish to create an US tax report, you can run

LANGUAGE=es LANG=en_US gnucash

Changing the Language on Linux

In either case, you can easily switch between the various languages the gnucash has available by placing the LANG env var before the call to the executable:

LANG=pt_BR gnucash <your-other-options>

Note for Debian users

Make sure your locales are properly installed. If not, run dpkg-reconfigure locales. Note that the default desktop manager for Debian is GDM which does NOT read the .xsession files. To get the right language using GDM, use the Options button on the GDM login screen and set the default language. (The list includes all those languages supported by locales). When you login, confirm that the new language is to be the default for future sessions.

Changing the Language on OSX

GnuCash 2.4.0 or newer

If you are running GnuCash 2.4.0 (or newer) on OSX, you can set the interface language by creating/editing the file "environment.sh" in the folder "Gnucash.app/Contents/Resources". You can get there by right clicking on the Application and choosing "Show Package Contents" and then navigating to "Contents" and then "Resources".

Create a file named "environment.sh" with the following lines (change language variables based on desired language):

export LANG=nl_NL.UTF-8 
export LANGUAGE=nl_NL.UTF-8

GnuCash 2.2.9 and older

On OSX, a good place to set your language preference is in the file "Gnucash" in "Gnucash.app/Contents/MacOS". You can get there by right clicking on the Application and choosing "Show Package Contents" and then navigating to "Contents" and then "MacOS". Change this file such that the last few lines are (change language variables based on desired language):

export LANG=nl_NL.UTF-8 
export LANGUAGE=nl_NL.UTF-8
$EXEC "$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS

Changing the Language on Windows

GnuCash 2.4.0 or newer

If you are running GnuCash 2.4.0 (or newer) on Windows, you can set the interface language by editing the file environment. By default this file is installed in c:\\Program Files\gnucash\etc\gnucash. Change this file such that the last few lines are:

# If you wish GnuCash to use a different language, uncomment the two parameters
# below and set LANG to your preferred locale
LANG=nl_BE
LANGUAGE={LANG}

Note that the second line should remain as-is. The braces are a variable expansion of the LANG variable.

The Language lines in your Environment folder should look like this (change language variables based on desired language):

LANG=fr_CA
LANGUAGE={LANG}

GnuCash 2.2.9 and older

A good place to set your language preference is in gnucash.cmd. By default this file is installed in 'c:\\Program Files\gnucash\bin'. Change this file such that the last few lines are:

set LANG=nl_BE
set LANGUAGE=nl_BE
start gnucash-bin %*