Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk6 min

Making ‘More Posts’ Multilingual in Ghost CMS: Translate Helper, Locale Files and the lang Attribute

Learn how to translate the “More posts” label in a Ghost theme using the translate helper, locale JSON keys, linked-string placeholders, and the html lang attribute, plus checks for pagination.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To make the visible “More posts” label follow your publication language in a Ghost theme, wrap the text in the {{t}} helper, add a matching key to the theme’s locale JSON file, and declare the page language with lang="{{@site.locale}}" on the <html> element. If the label is part of a linked sentence, the locale key must match that full string, including its link markup and placeholders, or the translation will not apply and the link can break.

Find where the label is generated

Start in the active theme, not in Ghost Admin. Search the theme’s .hbs files for the exact text “More posts” and note which template prints it. Two patterns are common, and they need different handling:

As an Amazon Associate I earn from qualifying purchases.

  • Standalone text. The label is the only visible text inside an element, such as a link to an archive page.
  • Full linked string. The label sits inside a sentence that includes an anchor and a dynamic value, such as an author line that reads “More posts by” followed by the author’s name.

The distinction matters because the translation key has to match what the theme renders. Ghost’s developer documentation on translation states: “Any plain text in your theme must be wrapped in the {{t}} translation helper, with {{t to the left of the text and }} to the right.” That rule covers both patterns, but the key you write for each one is different.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Wrap standalone text in the translate helper

For a plain label, replace the literal text with the helper and keep the English wording as the key:

<a href="{{url}}">{{t "More posts"}}</a>

The helper outputs the translated value for the publication’s language. The English text is the lookup key, so it must be spelled exactly as it appears in the helper, including capitalization. If you see the English label on a site set to another language, the usual cause is a missing or mismatched key in the locale file, not a problem with the helper itself.

Add the key to the locale file

Theme translations live in locale JSON files inside the theme’s locales directory. Work through these steps for each target language:

  1. Open the theme folder and confirm whether a locales directory already exists. If it does not, create it at the theme root.
  2. Create a file named for the locale code you use in Ghost, for example es.json for Spanish. The file name should match the publication language you will select in Ghost Admin.
  3. Add the key exactly as the template renders it, with its translated value:
{
  "More posts": "Más artículos"
}

The Spanish wording is an example. Have a fluent speaker review each translation for tone and for the audience of your publication before you publish it. An older Ghost v4 example in the community forums shows the same JSON structure and the same helper, but the locale file conventions were presented for that release, so check the current documentation for the version your site runs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Handle linked strings without breaking the link

When the label is part of a sentence with a link and a dynamic name, the theme may use one translation entry for the whole string. Ghost’s official locale example for Spanish uses this form, and it shows that linked text and placeholders can live in a single key. The two patterns compare like this:

Template pattern Key in the locale file What you translate What must stay unchanged
Standalone label, such as {{t "More posts"}} "More posts" The label text Nothing else; the helper and key name must match
Linked string with a placeholder, such as an anchor with {url} and {name} The full string, including the anchor tag and placeholders The words around the link and the text inside the anchor The anchor tag, the href='{url}' attribute with its quote style, and the {name} placeholder

For the linked form, copy the key character for character from the template. The example below is the form in Ghost’s official Spanish locale example:

{
  "<a href='{url}'>More posts</a> by {name}": "<a href='{url}'>Más artículos</a> de {name}"
}

If the theme writes the attribute with double quotes or changes the spacing, the key will not match, so the string will not translate. Keep the placeholder names unchanged; only the wording around them should change.

Set the page language in default.hbs

The helper translates text, but it does not tell browsers, screen readers, or search engines what language the page is written in. Set that declaration on the opening <html> element in default.hbs:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<html lang="{{@site.locale}}">

Then set the matching publication language in Ghost Admin under General settings. The template value follows the configured locale, so the two must agree. After saving, open the page source of each language version and confirm that the lang attribute reflects the locale you expect.

Translate pagination and navigation templates

A label that is translated on the homepage can still appear in English on other pages if the theme keeps visible text in other templates. Ghost’s guide says a fully translatable theme should include pagination.hbs and navigation.hbs, with plain text in every .hbs template wrapped in {{t}}. Search each file for hard-coded words, including previous and next page wording, navigation labels, and any “see all” link text, and apply the same helper and key process.

Keep the more_posts variable separate from the visible label

Ghost’s read-next tutorial uses a variable named more_posts. It is a Handlebars block parameter that holds the posts returned by {{#get}}. It is a code variable, not a translation key, and it does not determine what visitors read. Before you add a locale entry, confirm in the template which text is displayed and which name is only used in code.

The tutorial covers fetching recent posts, excluding the current post, limiting the number of results, and rendering the collection only when it contains posts. A related-post variant filters on shared tags. Because these are configuration patterns, check the current tutorial against your theme before copying them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Restart Ghost and verify each language

Ghost’s guide says to restart Ghost after theme changes. On a self-hosted installation, restart the service with the process you use to run Ghost. On managed hosting, confirm the host’s deployment or restart procedure instead of assuming a command-line tool is available. Then check the result in every language:

  • The locale file is present in the active theme’s locales directory and uses the correct file name.
  • The publication language in General settings matches the locale file you created.
  • The “More posts” label, and any linked sentence containing it, shows the translated text.
  • The link still points to the right destination and the placeholder values, such as the author name, appear correctly.
  • The page source shows the expected lang value on the <html> element.
  • Pagination and navigation text is translated on archive and post pages, not only on the homepage.

If the “see all” or pagination link breaks

Pagination can fail for reasons unrelated to translation. A 2024 Ghost Forum report on the Source theme, version 1.4.1, documents one configuration in which defining / as a route rather than a collection disrupted a “see all” link. Treat this as a documented example for that theme version and setup, not a general rule for Ghost.

If a link stops working after you change translations, compare these items before changing anything else:

  • The theme name and version you are running.
  • The routes configuration, including whether / is defined as a route or as a collection. On self-hosted sites this lives in the routes file, routes.yaml.
  • Whether the link failed before you added the translation. If it did, the cause is probably the route setup, not the helper.

Return the routes setting to the configuration the theme expects, then retest the link in each language.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.