You are here

[Fixed] GnuCash Portable 2.4.7: cannot set language

22 posts / 0 new
Last post
name12345
Offline
Last seen: 6 years 3 months ago
Joined: 2009-08-26 18:06
[Fixed] GnuCash Portable 2.4.7: cannot set language

I am trying to use GnuCash Portable 2.4.7 on my system (which is set to German language). However, GnuCash Portable always starts in English. It ignores the line "language=de" that I added to \Data\settings\GnuCashPortableSettings.ini

The only way to have it in German is by starting it via the PortableApps Platform Menu. Then the program surface (that is set through the "LANGUAGE=" parameter in nonportable GnuCash) appears in German. The account descriptions (set through "LANG=" in nonportalbe) are still shown in English though.

Any ideas?

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 9 months ago
Joined: 2007-04-15 21:08
PAL

GnuCash now uses the PortableApps.com Launcher.

If you have in the [GnuCashPortableSettings] section in Data\settings\GnuCashPortableSettings.ini a line "Language=de", it will work. It does need to be in that section.

With regards to the environment variables, take a look at App\AppInfo\Launcher\GnuCashPortable.ini; in the [Environment] section there is a line LANG=%PAL:LanguageCustom% - if you think that you need to set the LANGUAGE environment variable, try adding a line LANGUAGE=%PAL:LanguageCustom% after it. If that does what you want, we'll put it in. (I can't test it out right now.)

John: there should be a [FileWriteN] section mirroring [LanguageFile] so that after launching once from the Platform the language selection will be preserved.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

name12345
Offline
Last seen: 6 years 3 months ago
Joined: 2009-08-26 18:06
almost...

Thanks for the fast reply, Chris.
Adding "LANGUAGE=%PAL:LanguageCustom%" to App\AppInfo\Launcher\GnuCashPortable.ini TOGETHER WITH adding "Language=de" to Data\settings\GnuCashPortableSettings.ini indeed has the same result as starting from the platform (but only if BOTH lines have been added).
However, now we have the same issue I desribed in my first post: account descriptions (LANG-value) are in English and program surface in German.

name12345
Offline
Last seen: 6 years 3 months ago
Joined: 2009-08-26 18:06
Any help?

Anyone still looking into this? Right now, GnuCash Portable is not really useful for me Sad

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Unsupported

It would appear to be unsupported. Even when manually setting both LANG and LANGUAGE equal to de (or de_DE as described on the GnuCash local settings page), GnuCash will only show the app itself in German, not the descriptions. If GnuCash is supposed to show th descriptions in German when you set both of those to de, then there is a bug in GnuCash as I can't get it to work with a local or portable install of it. Unless you can figure out a way for us to alter this behavior, it will continue to be unsupported.

Sometimes, the impossible can become possible, if you're awesome!

Aluísio A. S. G.
Offline
Last seen: 7 years 8 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Maybe...

do you have any LC_* (e.g. LC_ALL, LC_MESSAGES) environment variables set? If not, can you try setting them?
I can check the translations to see if the descriptions are translated. I need a test string, though.

Previously known as kAlug.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Manually Set

I just manually set both LC_ALL and LC_MESSAGES to de_DE and then de and it had no effect either. So, again, even when manually setting LANG, LANGUAGE, LC_ALL and LC_MESSAGES to de (or de_DE) within the Environment section (not using PAL language switching at all), GnuCash keeps those descriptions in English. I'm gonna call this broken in the app itself and release 2.4.8 as is.

Sometimes, the impossible can become possible, if you're awesome!

Aluísio A. S. G.
Offline
Last seen: 7 years 8 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Language-specific

A last question: is this language-specific or happens with any language?

Previously known as kAlug.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
All

Could be all. I tried French and got the same result.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Partially Fixed in 2.4.8

With the launcher in 2.4.8, both the LANG and LANGUAGE variables are properly set. Unfortunately, GnuCash itself has bugs in it which prevent it from working. Even when manually setting LANG, LANGUAGE, LC_ALL and LC_MESSAGES in the manner mentioned by GnuCash developers, it fails to change the language of the account descriptions are still in English. This occurs on multiple test systems even when done to an unmodified local install of GnuCash. Until this bug is fixed, there isn't much we can do.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 7 months 2 weeks ago
Developer
Joined: 2008-07-23 07:56
PAL bugs
  • PAL sets language to English on first run, ignoring system language. System language would work, PAL forces English.
  • set language in \GnuCashPortable\App\GnuCash\etc\gnucash\environment (using de_DE, fr_FR ...) et voila, it works
John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not Quite

PAL doesn't force English language on run when you set it as de. Setting it as de sets the LANG and LANGUAGE environment variables, which GnuCash's own documentation says is supposed to work. Sadly, it doesn't. Why it doesn't is a question for the GnuCash devs, but either way it will use the undocumented setting in that file but refuses to use the documented LANG/LANGUAGE environment variables (regardless of whether it is de or de_DE).

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 7 months 2 weeks ago
Developer
Joined: 2008-07-23 07:56
Umm,

Start a fresh GnuCash Portable without Platform. PAL forces English. Using the old launcher, the system language is used, which is in my case german. So the bug is in PAL.
Have you ever read the page you've linked to?
http://wiki.gnucash.org/wiki/Locale_Settings#GnuCash_2.4.0_or_newer_2
My proposal is the offical way to change the language.

Aluísio A. S. G.
Offline
Last seen: 7 years 8 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
Hmm...

I'd say it's by design.

Previously known as kAlug.

Bart.S
Offline
Last seen: 7 months 2 weeks ago
Developer
Joined: 2008-07-23 07:56
Well,

maybe it's by design, but it's bad design. The portable software should do the same as the standard one.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Yes and No

I'll look into adjusting the launcher to use the system language when used without the platform. We'll still need a manual setting, of course, for users who want to set it as they travel and use different language computers.

Lots of apps default to English (portable and local). As it's the most common language by a pretty wide margin, that's usually a safe bet. As this app has detection built in system-wise, we should be able to manually set it as we've done for a couple GTK apps. Of course, any users using the platform will get their preferred language for most apps now regardless (hopefully all as we update launchers). I don't think it's that big a deal asking non-platform users to manually set their language since they're likely doing things quite manually with everything anyway.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 7 months 2 weeks ago
Developer
Joined: 2008-07-23 07:56
Sure,

good old apps can do that, working as expected.
* points to Gimp Portable, Dia Portable,...

Most local apps set language during installation based on system language. I don't think they force users to English.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
PAL Apps

I mean we have PAL apps that handle the 'system language' thing as well. I know, because I worked on them Smile I'll be ditching the rest of the old launchers for GIMP and others soon enough, which will make maintenance a heck of a lot easier. Dia needs an update, too, since it doesn't even support Unicode paths or partial path changes yet. Having them do system detect should be trivial since the code for PAL is already done with it. I just forgot to add it into GnuCash Portable when I switched it over because GnuCash is pretty complicated as it is (it has more file updates than any other app, currently at 33).

We may add the ability for installers to set language, but it's a good amount of extra work. I did it for LibreOffice Portable, for instance. As we encourage folks to use the platform, and the vast majority of users who want things automated do, the current setup is fine as both the installer and app will be in the platform language automatically.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 7 months 2 weeks ago
Developer
Joined: 2008-07-23 07:56
Dia Portable

doesn't need an update. Partial paths changing IS implemented. Supporting Unicode paths isn't needed, because Dia itself has problems with Unicode filenames/paths. It's recommended to use ANSI filenames for Dia. And btw. I think the Dia launcher script is Unicode ready (at least my latest build, don't know what's official). Blum

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Ah

It appears they changed it for no apparent reason in 2.4.0 (on Windows only) but left it accepting one environment variable but not the other when set externally. Very very odd.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Possible Full Fix

I've hacked together a possible full fix for the bug in GnuCash. I've just set it up with French and German so far. It should work whether you set it to those languages in the platform and run the app or manually within the INI and properly use the undocumented change Bart.S mentioned above. If this works for folks, I'll release a Rev 2 with all languages included.

To try it, just download this GnuCashPortable.ini and replace the one in GnuCashPortable\App\AppInfo\Launcher with this new one. Save the old one just in case.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 24 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Account Descriptions Fixed in 2.4.10-1

The issue with account descriptions in newly created workbooks not coming up correctly with auto language switching is fixed in 2.4.10-1 and should work for all common languages and most uncommon ones. If you notice a language fully supported in the platform and GnuCash that it is not working for, please let us know and we will add a custom fix for it.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments