How can I get reports with my locale settings?

John Ralls jralls at ceridwen.us
Wed Aug 24 23:42:44 EDT 2011


On Aug 24, 2011, at 1:08 PM, James Wilde wrote:

> Thanks, John.  That did it in the end.  The rest of my answer inline.
> 
> On Aug 24, 2011, at 00:13 , John Ralls wrote:
> 
>> 
>> On Aug 23, 2011, at 1:58 PM, James Wilde wrote:
>> 
>>> I'm running on a Mac, using the original Lion update (i.e. not the one with a .2 at the end of the file 
>>> name).
>>> 
>>> I cannot get gnucash to produce reports with a space as thousands separator and a comma as 
>>> decimal separator.  I have changed almost all the locale settings to sv_SE.UTF-8, but still reports 
>>> come with a comma for thousands and a dot for decimals.
>>> 
>>> Under Preferences, I see that the Locale setting is still USD, although I have opted for and selected 
>>> SEK, the Swedish Crown.
>>> 
>>> Any suggestions, please?
>>> 
>>> TIA
>> 
>> http://wiki.gnucash.org/wiki/FAQ#Q:_I.27m_a_Mac_user_and_I_want_to_use_Gnucash_in_a_language_different_from_my_system_settings.
>> 
>> I just tested Sverige and it formats everything as it should.
> 
> My impression is that this wiki article is a bit misleading.  I quote:
> 
> "GnuCash 2.4.0 or newer
> By default, Gnucash will select the first available translation from the list in your language list (System Settings>International or System Settings>Languages and Text, depending on what version of OSX you're using). Other localization settings (numeric format, date format, and default currency) are determined from the "Formats" tab of the same System Settings panel. Environment variables have no effect, and there is no environment.sh file."
> 
> I agree with the first bit.  The first language in my settings is English, the second is Swedish.  I don't agree with the second part, that other localisation settings come from the "Formats" tab.  Times, numbers, currency formats, the currency itself, and the numerical date format are all set to Swedish norms on the "Format" page, but none of them is used by gnucash, except the ISO date format, which I had to set in Preferences.  The default is US date format.
> 
> "If you want to use a different translation from the one that is automatically selected, you can run the following in Terminal.app:
>  defaults write -app Gnucash AppleLanguages '(de, en)'"
> 
> Didn't work.  Everything is still as before.  No observable change at all. 
> 
> "(Use whatever language codes you want, replacing Deutsch and English. It won't work if there isn't a translation file for the language you want.)"
> 
> Ah, maybe there's no Swedish translation.  Doesn't matter.  I don't want the program to run with Swedish menus.  I just want the numbers formatted in the Swedish way.
> 
> <snip>
> 
> "You can adjust the other locale settings similarly: Use AppleLocale 'xx_XX', providing a language and country code; you can specialize it for currency withAppleLocale 'xx_XX at currency=YYY', where YYY is a valid ISO-4217 currency code."
> 
> This did change things.  Not only did SEK become the default currency symbol in Preferences, but the report output now took on the form of the Swedish standard, space as thousands separator and comma as decimal separator.  This will probably make the conversion of text fields for monetary details to numeric fields in LibreOffice Calc a lot easier.  Up to now it has been a three stage process: filter off the currency symbol, replace commas with spaces and dots with commas.  Only then can I convert to a numeric field.
> 
> Is there another 'default write -app Gnucash' command that will change the default font to Courier or another one on my system?  Changing this in Preferences doesn't do diddly.
> 

A bit out of order, but no, at present there's no defaults settings in gnucash for anything but l10n.

What's the output of `defaults read -g AppleLocale`?

There is a Swedish translation, but since your first language in the language list is English, that's what you get.

Regards,
John Ralls





More information about the gnucash-user mailing list