Unable to change language
Geert Janssens
geert.gnucash at kobaltwit.be
Fri Mar 20 04:46:06 EDT 2015
On Friday 20 March 2015 09:58:49 John Ralls wrote:
> > On Mar 20, 2015, at 2:49 AM, Geert Janssens
> > <geert.gnucash at kobaltwit.be> wrote:>
> > On Monday 16 March 2015 21:12:44 John Ralls wrote:
> > > > On Mar 16, 2015, at 7:35 PM, John Sjölin <john.sjolin at swipnet.se
> > > > <mailto:john.sjolin at swipnet.se>> wrote:
> > > >
> > > > My interest for gnucash is for a customer.
> > > > Not being able to install gnucash in Swedish led me to search
> > > > the
> > > > net, where many have this problem with Swedish and in many cases
> > > > solutions that do not work on computers runing a Swedish Windows
> > > > operating system. I had tried all sugestions without success. I
> > > > even stumbled on a script where languges are defined, but cannot
> > > > remember where, perhaps the fault lies here. If you call
> > > > changing
> > > > the name on the folder sv to se hacking, then yes I hacked it,
> > > > this
> > > > is the only change made by me. The question remains why dosent
> > > > LANG= sv_SE work, especialy that Sami is not translated? I know
> > > > you
> > > > are right in your ref. to the ISO codes.
> > > > It would be interesting to hear if you are running on an English
> > > > windows system and that sv_SE works there. Other langugaes tried
> > > > worked as instructed but not Swedish!
> > > > I have not tried gnucash on my Linux system as my customer uses
> > > > Windows. Another observation is that the Swedish translation is
> > > > not
> > > > total.
> > > >
> > > > I apreciate your input.
> > >
> > > Unfortunately I'm on travel with only my Mac laptop and can't test
> > > on
> > > Windows until I get back at the end of the month. Uncommenting and
> > > setting to sv_SE the LANG and LANGUAGE lines in
> > > etc/gnucash/environment works fine there.
> >
> > I have just returned from travel :)
> >
> > FYI: https://bugzilla.gnome.org/show_bug.cgi?id=725296
> > <https://bugzilla.gnome.org/show_bug.cgi?id=725296>
> >
> > This is unfortunately a known, Windows-only bug. I doubt it's in
> > gnucash code though. I'd rather suspect one of the libraries it
> > depends on. John (Ralls), do you know off-hand which library is
> > responsible for internationalization ? libglib ?
> Depends on what localization. All formatting and date localization
> (including translations of month names) is handled by libc or on
> Windows msvcrt on Windows. As I noted earlier, msvcrt uses different
> locale names from POSIX. The mingw folks have wrapped the MS locale
> functions in POSIX, so one can use setlocale() and friends, but IIRC
> one needs to pass Microsoft locale names. The POSIX functions work
> with the environment variables LANG and LC_FOO.
>
> Translations, on the other hand, are handled by gettext, which by
> default uses the ISO-639 language codes specialized with ISO-3166-1
> country codes where appropriate (e.g., de and de_CH) and prefers the
> environment variable LANGUAGE, a colon-separated list of language
> codes. It’s smart enough to find its message catalogs (foo.mo) in a
> standard POSIX prefix/locale directory structure even when given only
> an ISO-3166-1code.
>
> It might be that for Windows the right thing to do is to specify
> “Swedish_Sweden” for LANG and “sv” for LANGUAGE in the environment
> file, though for Gramps I wrote some special locale-initialization
> code for Windows that includes an ISO<->Windows translation table. It
> might be necessary to do the same for GnuCash.
>
> Puzzling, though, that this hasn’t been an issue until a year ago.
Ok, thanks for the pointers. It looks like a bug in gettext. I'll move this thread to gnucash-devel
for further follow up as it's getting slightly too technical for gnucash-user.
I have tested
LANG=Swedish_Sweden
LANGUAGE=sv
in the environment file and this does work indeed. So that is now the recommended
workaround.
Geert
More information about the gnucash-user
mailing list