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. ![]()
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.
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 (
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__themeTranslationto 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.
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.
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. ![]()
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! ![]()
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. ![]()
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 ?