<!-- Built by scripts/build-agent-docs.mjs from site/agents-src/languages.md: edit that file. -->
# Page Lemon languages: guide for AI assistants

> For people: https://pagelemon.com/docs/languages explains this feature in plain words. This page is for AI assistants.

A site published with Page Lemon can speak more than one language: one folder of pages per language, linked so visitors and search engines find each version. Page Lemon serves static files, so you do the translating and the markup; Page Lemon makes the form and booking pages, and the emails customers get, follow the language of the page they came from. Publishing in general: https://pagelemon.com/agents.

Use this when the person asks for their site in another language ("Add French", "Make my site available in Spanish and German", "My customers speak Portuguese"), or when a site you build for them is meant for visitors in several languages.

## Plans and limits

Languages aren't charged separately and need no particular plan. The translated pages are files like any other, so they count toward the plan's files and site size (https://pagelemon.com/pricing).

- A site with 10 pages in 3 languages is 30 pages: count them before you start. A deploy over a limit is refused (`413 too_large` or `429 limit`, with an `agent_message` that names the number) and nothing is published: offer fewer pages or the pricing link.
- Forms and booking, if the site has them, are on paid plans only (https://pagelemon.com/agents/forms, https://pagelemon.com/agents/booking). A form or booking page works in every language with the same allowances.
- Say plan names, never ids.

## Ask the person

In one message:

- **Which languages**, and which is the main one (the one at the site's root). Page Lemon's own pages (the booking picker, form replies, the customer's emails) are in nine languages: English, French, German, Spanish, Portuguese, Traditional Chinese (Taiwan), Simplified Chinese, Korean and Japanese. For any other language the site's pages can still be translated, but those Page Lemon pages stay in the site's main language: say so.
- **All pages, or only some?** Default: every page, including the privacy page and the 404 page. A half-translated language confuses visitors and search engines, so don't leave any page in the old language.
- **Who checks the translation.** You translate; offer to show the person the wording of the home page and anything with prices, hours, legal wording or promises. Ask which words must stay as they are (business name, product names).
- **Prices, currency, dates and phone numbers:** keep the facts exact; ask only if the other market needs a different price or currency.

## What the person needs ready

Nothing, except any wording that must be exact (legal text, prices in another currency) and, if they want it, a native speaker to read the result. If the site has a booking page whose services have names the person wants in each language, they give those names.

## Set it up

All of this is plain files in the site; deploy them with `publish_site` (a `patch: true` deploy with `base_version` sends only the new files).

1. **One folder per language.** The main language stays at the root; each other language gets its own folder with the same file names: `/about.html` becomes `/fr/about.html`. Keep the URLs parallel and don't translate file names.
2. **Translate every page**: menu, footer, buttons, form labels and messages, image `alt` text, `<title>`, meta description and the JSON-LD text. Names, addresses, phone numbers, prices and links stay exact. Nothing left in the old language.
3. **Set the language** on each page: `<html lang="fr">` on the French pages and the main language (`lang="en"`) on the originals. Page Lemon reads `<html lang>`, so it must be right: it decides the language of the booking page, the form replies and the emails.
4. **Link the versions** in every page's `<head>`: one `<link rel="alternate" hreflang="<code>" href="<full URL>">` per language, pointing at the same page in each language (itself included), plus `hreflang="x-default"` for the main language. Use the site's live address (its custom domain, when it has one). Also update each page's canonical, `og:locale` and the `sitemap.xml` entries, and leave locked sections out of the sitemap.
5. **A language switcher** in the header or footer of every page: plain links named in each language's own words (English, Français, Deutsch) that open the same page in that language. No flags and no automatic redirect by the browser's language.
6. **Share one set of CSS, JavaScript and images** (root-relative paths such as `/css/style.css` work from every folder).

## Confirm with the person

Translating changes what visitors read, so before you deploy tell the person what you are about to publish: the languages, the list of pages in each, the folder addresses (`/fr/…`), and the wording of the home page and every price, hour or promise. Ask whether it is right; change what they correct. A form's or booking page's questions are confirmed by their own step (https://pagelemon.com/agents/forms, https://pagelemon.com/agents/booking); a translated copy of `snippet_html` adds none.

## Test

Deploy, then open a few translated pages (the home page, a page with a form or booking page, the privacy page) and check:

- every page of each language has the right `<html lang>`, its own title and description, and the full set of `hreflang` links (every language and `x-default`), pointing at pages that exist;
- the switcher on a translated page opens the same page in the other language, and back;
- nothing is left in the old language (menu, footer, buttons, alt text);
- for a form: the labels and messages are in that language and a real test message works; for a booking page: it opens in that language.

Tell the person the result and the addresses to look at before saying the language is live.

## Day to day

- A change to one page must be made in every language: update each copy (`get_site` with `path`, then a `patch: true` deploy).
- A new page needs its translations and `hreflang` links in every language, and an entry in the switcher.
- Removing a language: delete its folder (`deleted` in a patch deploy) and its `hreflang` links and switcher entries on every page.

## What Page Lemon refuses, and the fix

| Refused or wrong | Fix to offer |
|---|---|
| A deploy over the plan's file or size limit | Fewer pages, smaller images, or the next plan (link the pricing page) |
| A form or booking page that answers in the main language on a translated page | Check the page's `<html lang>`: it must be one of the nine languages' codes |
| Field names changed during translation | Keep the original field names and `action`; translate only the labels |
| `hreflang` links to pages that don't exist | Add the page, or remove the link everywhere |
| Pages left in the old language | Translate them or take them out of that language's folder and menu |

## Links

- For the person: https://pagelemon.com/docs/languages
- Forms: https://pagelemon.com/agents/forms · Booking: https://pagelemon.com/agents/booking · Templates: https://pagelemon.com/agents/templates
- API: https://pagelemon.com/docs/api · MCP tools: https://pagelemon.com/docs/mcp
- All AI guides: https://pagelemon.com/agents
