How do I add a Language (without using an installer)?

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, 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