To translate a Markdown guide offline, use macOS’s built-in translation feature to convert prose while manually preserving structural syntax. You will know the task is successful when the translated file renders in a Markdown viewer with intact relative links, functional code blocks, and correctly mapped link references.

Prepare your translation environment

Before editing, ensure your Mac can translate without an internet connection. Apple’s Translate feature relies on downloaded language models.

  1. Open System Settings.
  2. Navigate to General > Language & Region.
  3. Locate the Translation Languages section.
  4. Download both the source and target languages. If you want the Mac to use those downloads even while connected, enable On-Device Mode.

Wait for both downloads to finish. Disconnect Wi-Fi and any active wired network when convenient, then translate a new sentence selected in a local TextEdit document. Apple’s system translation menu should give you text in the requested language. A Safari webpage translation uses a different service. Keep the Markdown file open in a local editor throughout this test. If the Mac asks for another language download, reconnect, finish preparing it, and repeat with another new sentence.

Protect the source file

Never translate your original README.md directly. If you accidentally translate a structural identifier like a link label or a file path, you will break the document’s internal logic.

  1. Open Finder.
  2. Locate your original Markdown file.
  3. Right-click the file and select Duplicate.
  4. Rename the copy to README_ES.md (or your target language suffix).

Working on a duplicate allows you to use a diff tool later to ensure that only the prose changed, while the syntax remains identical to the English source.

Identify translatable prose versus immutable syntax

A Markdown document contains two distinct types of text: user-visible prose and immutable structural elements. You must distinguish between these to avoid breaking the document’s rendering.

Translatable elements

  • Headings: The text content of a heading (e.g., # Introduction).
  • Paragraphs: The body text of the guide.
  • List items: The descriptive text in bulleted or numbered lists.
  • Image Alt Text: The description used for accessibility (e.g., ![Alt text here](image.png)).

Immutable elements

  • Fenced Code Blocks: Everything inside triple backticks (```). Translating code or command-line strings will cause the instructions to fail when executed.
  • Inline Code: Text wrapped in single backticks (`path/to/file`).
  • Link Destinations: The URL or file path inside the parentheses of a link [text](destination).
  • Link Reference Labels: The identifier used in reference-style links (e.g., [label]: /path).
  • Anchors/Fragments: The #section-name part of a URL that points to a specific heading.

The step-by-step translation procedure

Use a plain text editor like TextEdit (set to Plain Text mode) or BBEdit.

  1. Open README_ES.md.
  2. Highlight a single span of prose (a sentence or a paragraph). Do not include any surrounding asterisks, backticks, or brackets.
  3. Right-click the highlighted text.
  4. Select Translate [Language].
  5. In the translation window, review the output. If the translation is accurate, copy the translated text.
  6. Paste the translated text back into your editor, replacing only the original English prose. Note: If you are translating an image alt text, ensure you only replace the text inside the brackets [] and leave the () path untouched.

A complete worked example

Consider this English source README.md:

# Setup Guide

Run the following command in your terminal:
`./configure --prefix=/usr/local`

Check the [installation logs][logs] for errors.

![Setup Icon](icon.png)

[logs]: docs/logs.md

To translate this to Spanish, your README_ES.md should look like this:

# Guía de configuración

Ejecute el siguiente comando en su terminal:
`./configure --prefix=/usr/local`

Revise los [registros de instalación][logs] para detectar errores.

![Icono de configuración](icon.png)

[logs]: docs/logs.md

Observation of changes:

  • The heading changed from “Setup Guide” to “Guía de configuración”.
  • The prose changed, but the inline command `./configure --prefix=/usr/local` remains exactly the same.
  • The link text [installation logs] became [registros de instalación].
  • The link label [logs] and its definition [logs]: docs/logs.md remain unchanged. This is critical because the renderer uses the label logs to find the destination. If you renamed the inline label to [registros] and left the definition as [logs], they would no longer match.

Verifying the translation integrity

Once you have finished the file, you must verify that the structural links still function offline.

  1. Render the file: Open README_ES.md in a local Markdown viewer (such as MacDown or a browser extension).
  2. Test Relative Links: Click on the translated link (e.g., [registros de instalación]). The viewer should navigate to docs/logs.md on your disk.
  3. Test External Links: If the document contains a link to an external site, ensure the URL remains intact.
  4. Check Code Blocks: Ensure the code blocks are not italicized or bolded, which happens if you accidentally include markdown delimiters in your translation selection.

Troubleshooting failures

If the document fails to render correctly, check for these common errors:

  • Broken Link Labels: If you see [text][label] in the editor but the link is not clickable in the preview, check the bottom of the file. You likely translated the [label]: definition. Revert the label to the original English string.
  • Broken Code Blocks: If a command like `./configure` appears as ./configure, you likely included backticks in your translation selection. Remove the extra formatting.
  • Broken Image Paths: If an image disappears, check if you accidentally translated the path inside the (). The path must remain a literal string matching the filename on your disk.

If a change is hard to reverse, make a fresh working copy from the original and copy across only the translations you have reviewed. Keep the first attempt available until the new version renders correctly.

A common difficulty arises when a Markdown document uses advanced link features, such as fragment identifiers (anchors) or links that contain their own internal formatting. These elements require a higher level of precision during the translation process because a single misplaced character can decouple a link from its target destination.

Fragment identifiers are the portions of a URL following a hash symbol (#). They are used to point to a specific heading within the same document. For example, in the link [Installation Steps](#installation-steps), the string #installation-steps is an immutable identifier.

If you translate the text of the heading from “Installation Steps” to “Pasos de instalación”, the link will no longer find its target unless you also update the fragment identifier. Changing that identifier also affects readers following the old address, so decide which URLs must keep working before translating the heading.

The correct approach:

  1. Translate the visible link text: [Pasos de instalación].
  2. Keep the fragment identifier exactly as it was in the English version: (#installation-steps).
  3. Ensure the target heading’s anchor remains unchanged.

Heading IDs are a feature of the renderer. CommonMark defines heading syntax, while the preview or publishing system chooses whether and how to assign a fragment. One simple solution for a short handoff is to retain the original heading text for sections that other documents link to, with a translated explanation on the next line. Where the renderer supports an explicit ID, use its documented mechanism and test the old link. A link that you control entirely inside the translated file can instead point to the new heading ID. Test it in the renderer the reader will use.

Sometimes, a link text contains bold or italicized spans. For example: Check the [**critical** error logs][logs].

When using the macOS Translate feature, you must be careful not to include the asterisks in your selection. If you highlight **critical** and translate it, the translation window might return **crítico**. If you paste this back, the syntax remains intact. However, if the translation service strips the asterisks or if you accidentally include them in a way that the editor interprets as part of the prose, the bolding will fail.

The workflow for nested spans:

  1. Highlight only the word critical.
  2. Translate and replace.
  3. Verify that the resulting string is still wrapped in **.

Second worked case: A technical configuration guide

To further demonstrate the distinction between prose and identifiers, consider a more complex scenario involving a configuration guide for a software tool. This example includes a combination of inline code, a reference-style image, and a reference-style link with a title.

Original English Source (config_guide.md):

# Configuration Instructions

To begin, navigate to the directory:
`/usr/local/bin/config`

Follow the [setup instructions][setup_ref] to initialize the environment.

![Configuration Icon](assets/icon.png "Config Icon")

[setup_ref]: ./setup_guide.md "Setup Guide"

In this document, we have several “danger zones” where translation could break the file:

  • # Configuration Instructions: A translatable heading.
  • `/usr/local/bin/config`: An immutable inline path.
  • [setup instructions]: Translatable link text.
  • [setup_ref]: An immutable link reference label.
  • ./setup_guide.md: An immutable relative path.
  • "Setup Guide": A translatable link title (this appears when hovering over a link).
  • ![Configuration Icon]: Translatable image alt text.
  • "Config Icon": A translatable image title.

The Translated Spanish Version (config_guide_ES.md):

# Instrucciones de configuración

Para comenzar, navegue al directorio:
`/usr/local/bin/config`

Siga las [instrucciones de configuración][setup_ref] para inicializar el entorno.

![Icono de configuración](assets/icon.png "Icono de Configuración")

[setup_ref]: ./setup_guide.md "Guía de configuración"

Detailed breakdown of the translation decisions:

  1. The Heading: The text was translated, but the # symbol was preserved.
  2. The Path: The string /usr/local/bin/config was left entirely untouched. Translating “bin” to “binario” would cause the terminal command to fail.
  3. The Link Text: [setup instructions] was changed to [instrucciones de configuración].
  4. The Link Label: The identifier [setup_ref] was not translated. If it had been changed to [ref_setup], the link would point to nothing because the definition at the bottom of the file still uses [setup_ref].
  5. The Link Destination: The path ./setup_guide.md remains exactly as the original.
  6. The Link Title: The string "Setup Guide" was translated to "Guía de configuración". This is safe because it is a user-visible tooltip.
  7. The Image Alt Text: Configuration Icon became Icono de configuración.
  8. The Image Title: "Config Icon" became "Icono de Configuración".

Check a moved translation before handing it over

Moving a guide can break a relative path even when the path was copied perfectly. Imagine an English README beside an assets folder. Its Spanish copy initially sits beside the English original and displays the same image. Later it is delivered in a new folder named es. An unchanged link to assets/icon.png now asks the viewer for an assets subfolder inside es. That folder may not exist. Open the guide from the actual delivery folder before attributing a missing image to translation.

If both languages should share one image, choose a layout first. You could keep the two Markdown files side by side and use distinct filenames. Alternatively, a translation inside a language subfolder could link up one directory to a common assets folder. Test that arrangement with a complete copy of the package on your Mac. Opening the file from a project preview that supplies a site-wide root can hide a dependency that an ordinary standalone viewer cannot resolve.

Read the translated steps once with formatting visible and once in the normal preview. In the editor, check punctuation immediately around every path and inline command. In the preview, ask whether the reader can distinguish the text to type from the explanation next to it. A shell argument printed in italics instead of inline code can still look plausible while no longer being visually identifiable as literal input. Compare the command against the original file and restore its delimiters if they have changed.

For a translation that will be maintained, keep a copy of the source revision and a list of the few items you intentionally preserved in English. Examples include a literal button label, the name of a configuration variable, and the wording of an error the reader must look for in an English-only tool. This helps the next editor tell a deliberate choice from a sentence accidentally skipped. Record an unresolved term with the surrounding sentence so that the author can answer a concrete wording question.

Reopen one internal link, one image, one section link and the last operation in the translated guide. Compare external URL destinations as text while offline. These checks establish that the file and its local dependencies still work in the chosen viewer. They also identify which remote destinations will need a connected check when the documentation is next released.

References