How do I change the GrampsPortable (Windows) Language?

A new user on Facebook is asking how to switch the default language on the PortableApps for Windows. (In his case, he is asking how to add the Italian GUI.) I know neither where to look in the PortableApps version to determine if all languages were pre-installed [yes, they were all pre-installed], nor how to enable an installed language.

The language wiki pages that I have found all push people towards re-installing or use OS specific tools.

Can someone list the (minimal) steps for finding a specific language’s (or dialect’s) files in the GitHub Repository? (is it just a Dict & a Translation file?). After that, copying them the correct local directory path, and enabling them as the default language?

It seems like an OS agnostic Language enabling process should be a first page to translate in each language. But it doesn’t exist yet.

In addition, are the Help button target URLs language aware?

Alternately, if a user registers as a WikiContributor, sets their language and uses the option to keep themselves logged in; does the Wiki forward them to their native language if a translation exists for the landing page?

It is not possible to add a language to a live installation without using the installer. Part of the install process involves generating a *.mo file from the *.po files, done programmatically. So there is nothing to copy on Github.

The dict files are also difficult, you would have to find the file in the source tree used to build the AIO (for Windows, this would be in the MSYS2 installations). And then copy it to the right place in the AIO installation.

It would be easier in both cases to do an install of Gramps, somewhere else, and then find and copy the files to the desired installation. A lot of work, when you could just rerun the installer.

At least some of the help buttons are supposed to direct to language specific pages on the wiki. The URL gets a ‘/fr’ etc. appended to the end of the URL. The best way to see if this works is to test it in each page. I’ve noted that not many pages are actually working this way, mostly because translations are missing or out of date.

Ouch. Re-running the installer won’t be an option. The PortableApps installation seems to have many tweaks to make file-paths go to thumbdrive instead of %AppData% folder. (Probably a relative path in relation to the main Gramps application.)

So I guess that means delving into a PortableApps installation. I’ll try to determine if Bart.S included all the translations. (And other dependencies like GraphViz. And whether that was the 32bit or 64bit version.)

Do you know anything about the command line option mentioned the Change the Language of Reports:
locale -a

Is it a tool to identify currently installed Gramps language support? Or perhaps it is a Linux command to report installed OS languages?

The ‘locale’ is a Linux command, used to determine the currently installed languages of Linux. The rest of the wiki page describes how to use the LANG, LANGUAGE environment variables which can be preset in a command line in Linux that starts Gramps to select an alternate run language.

We sometimes use an alternate shortcut in Windows that does the same thing, presetting these env variables as we start Gramps. see Gramps 5.1 Wiki Manual - Settings - Gramps

1 Like

That is a messy way to do it, idealy it sould be added an setting in gramps that change the language at next startup (if they are installed ofc).

I tried to make a suggestion in the bug tracker, but it was just merged with another one that was then closed because you can change language that way, while that is not what I want. Changing a shortcut manually is not really user friendly.

1 Like

The Italian user left out some information about trying GrampsPortable to run in his language. He ran the Installer, selected Italian but Gramps still ran in English. I did some experiments and came up with the following:

Even though Italian was chosen from the pop-up menu in the Installer, GrampsPortable still ran in English.

[Defaulting to English is by design. The PortableApps people decided that they have run into too many variants of dynamically configuring an App for another language. They now just offer options to install language support. Then leave the final configuring to the user.]

So I looked at the various settings files. In the [Language] section of the GrampsPortable.ini settings file, the “DefaultIfNotExists=” was still set to “en_US” (English, USA dialect). Searched for something that resembled Italian in the files and found dictionary and affix files that were labeled “it_IT.dic” and “it_IT.aff”.

Updating the settings file in a text editor (I used Notepad++) made GrampsPortable run in Italian.

Copying the it_IT dictionary and affix files from
..\GrampsPortable\App\Gramps\share\enchant\myspell-all
to
..\GrampsPortable\App\Gramps\share\enchant\myspell
enabled spell check in Italian.

The location of the settings file to update when installed on a USB drive mounted as drive letter “G:”

G:\GrampsPortable\App\AppInfo\Launcher\GrampsPortable.ini

The setting file chunk to be updated:

[Language]
Base=%PortableApps.comLocaleglibc%
CheckIfExists=%PAL:AppDir%\Gramps\share\locale%PAL:LanguageCustom%*.*
DefaultIfNotExists=it_IT

It still remains outstanding to determine how to configure GrampsPortable to prefer the Italian it_IT.dic and it_IT.aff files. They are in the following folder:
G:\GrampsPortable\App\Gramps\share\enchant\myspell-all

It seems like they should be in:
G:\GrampsPortable\App\Gramps\share\enchant\myspell

[Solution revised]

After my test, I’ve tryied this with fr_FR and Gramps works in french but not the dictionary wich is still in english

1 Like

I’ll have to do some more experimentation. Changing the GUI language manually isn’t a 'deal breaker’s problem. But the Dictionary not switching too is worrisome.

And the dictionaries only list about 16 languages (including UK & US English dialects) … even though there are more than 30 installer Languages. Than means the hint the dictionary gives (like french users see fr_FR.dic) isn’t there for for more than half the possible languages.

Could you try copying the French .dic & .aff files from the following GrampsPortable subfolder:
..\GrampsPortable\App\Gramps\share\enchant\myspell-all

Intuitively, it seems like they should be in:
..\GrampsPortable\App\Gramps\share\enchant\myspell

Dictonnary works fine after copying fr_FR .aff and .dic files

1 Like