How to translate Portal


I’ve been wanting a localized version of the Portal for a while, as I think it is friendlier for potential new subscribers to be greeted in their language. Does anyone know of any collaborative projects to that effect?

In the meantime, I’ve downloaded the source code from GitHub - TryGhost/Portal: Drop-in script to add membership features in a Ghost theme and played around with translating the relevant parts into French. Now I have an updated .zip file with (I think) most of the translation done, but how would I use it to replace the existing portal?

I’m self-hosting with the Cloudron app, but I can manage with a general hint of where to look.

Thank you!

UPDATE: I’ve followed the instructions posted here How to modify and load the portal directly from your theme , but after editing config.production.json, the portal doesn’t load. I tried even using the original portal file from and uploading it into my theme, to make sure it wasn’t a mistake I’d introduced into the file, and it’s the same. So I guess, now, notwithstanding any changes/translations I may add to the portal.min.js file, my question is how to get the portal to load from editing config.production.json.

Otherwise, if there is a way to edit defaults.json directly to point to the new url, that would be great, but I guess the read-only filesystem (of Cloudron install) would prevent that?

If I am not mistaken, you get to load from current/core/shared/config and, in the defaults.json you change the path in

        "url": "URL",
        "version": "2.14"

Thanks, I’ve tried but had no success with that.

FYI we now have a community project plan for implementing translations properly, just in case either of you are interested :slight_smile:

1 Like

That’s a really good idea! I could only contribute translation, though.