You are here

[Fixed] Gramps doesn't use system default language

18 posts / 0 new
Last post
TheDutchJewel
TheDutchJewel's picture
Offline
Last seen: 3 years 3 months ago
Joined: 2012-07-24 14:03
[Fixed] Gramps doesn't use system default language

I have installed latest version of Gramps Portable (5.1.4) with the additional languages option enabled, but the program starts in English and not in the default language of my system (Dutch).

How can I make Gramps start up in Dutch?

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Platform

It should automatically switch with the PA.c Platform. Is it not for you?

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

Bart.S
Offline
Last seen: 5 months 3 weeks ago
Developer
Joined: 2008-07-23 07:56
Standalone

Standalone PAL forces users to English.

TheDutchJewel
TheDutchJewel's picture
Offline
Last seen: 3 years 3 months ago
Joined: 2012-07-24 14:03
CheckIfExists

Thank You!

If I change DefaultIfNotExists= in App\AppInfo\Launcher\GrampsPortable.ini from en_US to nl, it works fine.

But it's still strange, because the language files exist in Gramps\share\locale\.

Or is this code (CheckIfExists=%PAL:AppDir%\Gramps\share\locale\%PAL:LanguageCustom%\*.*) not working as expected?

thedutchjewel.freehostia.com

Bart.S
Offline
Last seen: 5 months 3 weeks ago
Developer
Joined: 2008-07-23 07:56
Bad design

The code is working as expected, but without platform and its environment variables this check will fail.
PAL shouldn't set language without an ini or platform running, but it does. That's bad design and custom code is needed to circumvent this.

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Incorrect

This is demonstrably incorrect. Although Gramps offers no way for a user to change the language within the app due to it being a Linux port, Gramps Portable has user language switching without needing to implement an environment variable. Just make a single change to the settings INI as I mention here and it's good to go. PAL does this without any custom code needed.

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

Bart.S
Offline
Last seen: 5 months 3 weeks ago
Developer
Joined: 2008-07-23 07:56
Huh?

again: PAL shouldn't set language without an ini (GrampsPortableSettings.ini in Data\settings) or platform running, but it does.
I know about your mentioned workaround and wrote nothing about implementing an environment variable in custom code. Custom code is needed to avoid setting the language.
I wrote in other thread that changing App\AppInfo\Launcher\GrampsPortable.ini isn't a good idea and that users should change settings file in Data. Also mentioned here already.
Forcing users to English is bad design, even if they could change one line in an ini later.

depp.jones
Offline
Last seen: 1 day 7 hours ago
DeveloperTranslator
Joined: 2010-06-05 17:19
What about dropping

What about dropping "DefaultIfNotExists" completely?
Gramps would use its own automatic language selection according to the current OS in standalone mode and fall back to this behaviour only when a platform language is selected that is not supported by Gramps anyway. I think, that would only break some special use cases (like greek platform language on a computer in thailand not set to english language f.i.). And these few still could be ironed out with the setting in the ini-file.
Still not the most elegant solution...

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Seems To Work

This seems to work in my testing. I know a while back there was an issue with it but don't recall what it was. I'll switch it to do this for the next release.

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

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
There's No Custom Code

Gramps Portable works out of the box for the majority of users. About 75% of our users use the platform. Gramps Portable will automatically switch languages with the platform for them using PAL's built in language switching. Of the remaining, the majority use English, so Gramps will be in English for them.

Like other ported apps, Gramps provides no ability for an end user to change the language within the app itself (poor design). So, if someone is traveling and wants to use it in English while using a French windows machine, they're stuck. Unless they either set an environment variable at the system level or launch the app with a batch file they create and set an environment variable.

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

Bart.S
Offline
Last seen: 5 months 3 weeks ago
Developer
Joined: 2008-07-23 07:56
Statistics

Don't talk about statistics, they're all false. You don't know how many use the platform for downloads only, how many use it with language switching disabled or don't use it at all. And english natives are the minority worldwide. That doesn't matter at all here. Let's talk about code.

Yes, Gramps without a language preference setting has poor design for an end user.

But PAL has bad design for all standalone portable apps users (almost all apps using it).

For apps with ability for an end user to change the language within the app itself it is confusing to see English but very easy to fix. You won't see support questions. For apps like Gramps help is needed. It's bad first user experience and very unnecessary.

An elegant solution would be: Better PAL design.

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Re-Read, No Custom Code, Already Solved For Next Release

Re-read the other post where we already solved the issue you have here. For non-Platform users we're gonna dump it back to Gramps' default, using the system language. And, if the user wants, they can set a language manually within the INI as stated to use, say English Gramps on a French Windows machine, all without needing to manually create batch files or set environment variables like local Gramps users who want the same do. None of this requires any custom code. You said it did and I stated that you were incorrect. I know you like the old-school custom NSIS launchers, but I'm not sure why you're continuing to state things about PAL that are demonstrably false.

And for stats, these are quite accurate. Remember, I have access to the website and platform stats.

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

Bart.S
Offline
Last seen: 5 months 3 weeks ago
Developer
Joined: 2008-07-23 07:56
Pfff

I don't state things that are false. Look at the code. PAL is setting language when it shouldn't.
Dropping "DefaultIfNotExists" has other side-effects and isn't an elegant solution.

That's my last post here, because there are easy workarounds. Keep on forcing users to English with PAL.

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Standalone, Single Settings Change

Ah, if you're using it standalone (without the platform), just explore to the GrampsPortable\Data\settings folder and open up the GrampsPortableSettings.ini file. In there, just below the [GrampsPortableSettings] line, add this line:

Language=nl

That'll set you to Dutch and it's preserved on upgrades. This is an annoying workaround we do with apps that provide no way for the user to change the language within the app.

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

TheDutchJewel
TheDutchJewel's picture
Offline
Last seen: 3 years 3 months ago
Joined: 2012-07-24 14:03
Thanks

Yes, I run all portables on my system standalone.

Thanks for the solution and the explanation. It works fine.

thedutchjewel.freehostia.com

John T. Haller
John T. Haller's picture
Offline
Last seen: 7 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in 5.1.5

This is fixed in Gramps Portable 5.1.5. When not using the PA.c Platform, Gramps will fall back to its internal handling of automatic system language selection if you haven't set it manually.

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

BAMaustin
Offline
Last seen: 1 month 2 weeks ago
Joined: 2021-04-16 15:48
Significant fixes of Gramps 5.2 core for language detection

The 5.2 beta cycle is being very useful. It brought focus onto the installer process and the some long-standing issues in properly adapting to OS languages. So there will be changes there. But that might affect the ways PortableApps has had to compensate to make GrampsPortable work.

Brian

Bart.S
Offline
Last seen: 5 months 3 weeks ago
Developer
Joined: 2008-07-23 07:56
PAL bug

Gramps was adapting the OS language fine.
This bug report was against the PAL and its configuration: https://portableapps.com/apps/development/portableapps.com_launcher

Log in or register to post comments