Unable to change language

John Sjölin john.sjolin at swipnet.se
Fri Mar 20 09:20:35 EDT 2015


Hej,

Thank you very much for your replies.

I have tried Geert Janssens solution 
LANG=Swedish_Sweden

LANGUAGE=sv

on one computer, Windos 7, and it works.
I will test futher and get back only if I hit a problem.

John Sjölin

From: John Ralls-2 [via GnuCash] 
Sent: Friday, March 20, 2015 1:49 AM
To: John Sjölin 
Subject: Re: Unable to change language


> On Mar 20, 2015, at 2:49 AM, Geert Janssens <[hidden email]> wrote: 
> 
> On Monday 16 March 2015 21:12:44 John Ralls wrote: 
> > > On Mar 16, 2015, at 7:35 PM, John Sjölin <[hidden email] <mailto:[hidden email]>> 
> > > 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. 

Regards, 
John Ralls 


_______________________________________________ 
gnucash-user mailing list 
[hidden email] 
https://lists.gnucash.org/mailman/listinfo/gnucash-user
----- 
Please remember to CC this list on all your replies. 
You can do this by using Reply-To-List or Reply-All. 



--------------------------------------------------------------------------------

If you reply to this email, your message will be added to the discussion below:
http://gnucash.1415818.n4.nabble.com/Unable-to-change-language-tp4668737p4677031.html 
To unsubscribe from Unable to change language, click here.
NAML



--
View this message in context: http://gnucash.1415818.n4.nabble.com/Unable-to-change-language-tp4668737p4677053.html
Sent from the GnuCash - User mailing list archive at Nabble.com.


More information about the gnucash-user mailing list