Anyone interested in translating an official theme?

I would like to be part of this effort to make all of the official themes multilingual. Is there already an ongoing work in a branch, or a group that I can involve?

Hey folks! I’m not Hannah (clearly!), but I’ll tell you what she said when I asked about translating official themes. (That was ~September, 2024.)

The current code that handles theme translation is old and creaky, something that the ghost team wrote because there wasn’t anything great out there when they needed, and it’s just not super great. They’d like to switch theme translation over to the i18next package, which is the (supported, not home-grown) package that handles all the rest of Ghost translation. That’s the current blocker. They don’t want to handle translations of official themes until they’ve switched over the i18next and are sure that the current string formatting is what’s actually going to be supported.

I have maybe half of that work done and in a draft PR sitting in Github. I hope to get back to it at some point, but I’m struggling to keep up with my paying work, and I can’t donate that time right now. If someone is ready to go on it, feel free to fork my fork and make some progress. It’s here: [WIP] Theme i18n by cathysarisky Ā· Pull Request #21490 Ā· TryGhost/Ghost Ā· GitHub

(If someone would like to fund that work for a couple months from now, please get in touch.)

Edit: Golly, I should really read the whole thread before responding to the last bit of it, where you can scroll up and read what Hannah said herself. (Although I think I added a little extra context from a separate convo I had with her, at least!)

I’ll take a look at this and try to figure out why it’s so challenging. But since you already looked at it, it would be great if you can roughly point out the challenging part(s) of this work.

Fine, but both initiatives, are incomplete and will not work, because as show in docs, theme translation MUST have ā€œpagination.hbsā€ and ā€œnavigation.hbsā€ at partials folder and the translation tags there. I did this, and now my Casper Fork works.

As for now, Ghost are not accepting i18 translations in default themes, since they are working in i18 for Ghost, and i18 are not stable yet. From main Ghost dev perspective is ok. Since, need to deal with some dilemmas, like the logical values that are in ā€˜package.json’ and are used in theme templates *.hbs, etc.
But, for many people on community, they want to use Ghost in production with i18 for their audience. In this way, I create a Github Organization where I will add all OpenSource Ghost Themes and adjust i18 needs. Everyone want to help. Are welcoming.

Hey folks!

It’s Sunday, so I’m goofing off (instead of working) by ripping out the existing theme translation package and making it use i18next.

I’ve been making use of the Source-i18n package for testing (thanks @NinoBagatello , and I see there’s a Casper fork (from @jobdiogenes ) that I can also try.

However, I know I’ve seen more complex usage in some paid themes, and I’d like to make sure my re-implementation isn’t going to break those.

So… I could use some help. Is there anyone making ā€œinterestingā€ use of the ā€˜t’ function in themes, including passing in variables, nested t, etc, able to help me manually test the edge cases?

You could either: 1) Send me a link to download your theme, preferably with demo content & any required routing files or 2) grab my version of Ghost and install somewhere and test it yourself. (✨Theme i18n converted to use i18next (with feature flag) by cathysarisky · Pull Request #23161 · TryGhost/Ghost · GitHub )

Note: If you provide me with access to a paid or non-MIT licensed theme, I’ll only use it for testing, never for installing anywhere beyond my local dev setup. :) Thanks in advance!

Update: I see there’s a bunch of themes in jobdiogenes 's Github org. I’ll go explore there. :slight_smile:

Hi @NinoBagatello, will there be an update soon to take into account the new social links?

@bastien the latest release of source is 1.4.1 from december 2024. Releases Ā· TryGhost/Source Ā· GitHub

as soon as there is a new release i will update.

@NinoBagatello , Source has definitely been updated more recently than December, to add the new staff member socials. :)

@Cathy_Sarisky I see there is a Git tag 1.5.0 that wasnt marked as github release. so i got no notification about it.

@bastien @Cathy_Sarisky

Source-i18n updated to v1.5.0 Git tag of upstream:

Thank you @NinoBagatello

If it’s in native source, filing an issue report either in the bugs forum or over in the github repo would be a reasonable action.

Alternately, nothing prevents you from editing your copy of the theme to have the behavior you want. :)

Hey translator friends! I can use some help over here:

Hey friends!

So…. the PR to swap out for the translation package behind theme translation went through earlier this week. This is the item identified previously by Hannah (:backhand_index_pointing_up: earlier in the thread) as a blocker for doing translation of official themes.

The PR will be in the release cut tomorrow (6.11, I think?), and should roll out to Ghost Pro next week on the usual schedule (mostly Tuesday).

IMPORTANT: None of this work changes anything you will see on your site, unless I made a mistake. It was a one for one replacement of existing functionality. Furthermore, it’s behind a private flag, which means it isn’t live on your site unless enabled.

I would love to have some folks running in languages other than English test it out. Here’s how:

  • If you self-host:
    After upgrading to 6.11 (available tomorrow)…
    In your config.production.json:

    "labs": {
    "themeTranslation": true
    }

    (Docker users and others using environment variables would set labs__themeTranslation to true.)

    Restart Ghost. This setting causes the Labs part of Ghost settings to show more options. Find and toggle the ā€œTheme Translationā€ toggle to on to activate the new translations package.

  • If you are on Ghost Pro:
    Send an email to their support address, asking to have the private themeTranslation turned on. Note that they will have lower staffing levels over the holidays, so you might want to make that request early next week.

  • (This space reserved for telling you what to do if hosting with @jannis or @muratcorlu )

Again, the expected result of turning on this private beta is absolutely no change. Don’t PM me to tell me that it isn’t working when nothing obvious happens. :slight_smile: Do PM me if you notice anything translation-related that’s not right after you flip the toggle, but right when you turn it back off.

Yep. 847 lines of code, 20 files changed, and two rewrites for a PR that does absolutely nothing you can see on your site. :rofl: But it’s the foundation for what comes next…

I’m hoping we’ll do official theme translation in early 2026. I’ve got a PR in on Source, but we’ve run up against the holiday code release freeze, so it won’t be available before 2026.

If you are excited to contribute strings for Source, you can find a draft list of strings here:

On my to-do list is figuring out the best way to handle a set of shared strings across the official themes, so that (once we get everything wrapped for translations). Still thinking about that.


Did you read all the way to the end? Thanks, and sorry for the novel.

For anyone curious: I don’t work for the Ghost Foundation. The work above was not funded by anyone, and is my donation to the community. If you’re benefitting financially from my work and would like to see more of it, please consider supporting me. Here’s my Github sponsors page. (And a super huge shoutout to Magic Pages and Synaps Media for being monthly sponsors. I appreciate you!)

Great job @Cathy_Sarisky! It’s a remarkable effort and this will help thousands of websites using official themes to have better localization.

As far as I understand, this change doesn’t require any updates for the themes currently support translations, right? If so, I would like to happily enable this flag by default for all of the sites in Synaps Media, right away. :blush:

Correct. It’s a 1:1 functionality replacement. No theme updates needed.

(Unless I made a mistake. I do not think I made any mistakes. This time.)

Huge thank you, Cathy! :tada:

Once that rolls out, it will also be default-enabled on Magic Pages (so, even if things go wrong, we can hopefully collect feedback quickly āˆ’ disabling is always possible on request).

Tiny update: The new ā€˜t’ helper will take a safestring, which makes this work with the new helper but not the old:

{{#with (concat "dog" "and" "cat" separator=" ") as |Key|}}
{{#foreach Key }}{{t this}}{{/foreach}}
{{/with}}

I’m not calling that a mistake, but an enhancement. :wink:

Thanks to MilaSen for identifying the difference, over here: Translation helper ({{t}} doesn't accept SafeString as argument Ā· Issue #25770 Ā· TryGhost/Ghost Ā· GitHub

Hey @Cathy_Sarisky , can we help here to officially translate source ? or maybe this can be use : GitHub - SourceTheme-i18n/Source: The default theme for Ghost ?