Bilingual static sites | Windsurf debugging | Last updated 2026-05-18

How to Fix Mixed English/Vietnamese Output from Windsurf

Mixed language is one of the easiest AI-generated site problems to miss. A page can look mostly correct, but one heading says Contents, another button says Đọc bài đánh giá, and a comparison table mixes English sentences with Vietnamese labels.

I have hit this problem while building bilingual static pages for MS Smile AI Review Hub. The fix is not to manually edit the generated HTML and hope it stays fixed. The fix is to trace where the text comes from, patch the source generator or localization layer, rebuild, and test both language versions.

This guide explains the workflow I use when Windsurf creates a page that mixes English and Vietnamese. It supports the main article about ChatGPT prompts for Windsurf, because the best fix starts with a better debugging prompt.

Why mixed language happens

On a static site, text can come from many places: handwritten article content, navigation templates, footer templates, generated tables, FAQ schema, breadcrumbs, social labels, and localization replacements. Windsurf might fix the visible paragraph while leaving the table of contents or JSON-LD untouched.

The problem gets worse when English pages are the source and Vietnamese pages are generated later. If the localization layer only translates common UI words, a new article may keep English headings and body content under `/vi/` while only the menu is Vietnamese.

That is why I treat mixed language as a pipeline bug, not only a content bug. The question is not simply which words are wrong. The question is which source created those words and whether the next build will recreate the problem.

How I inspect the page

I start with the live or local URL and make a short list of every mixed-language area. I check the title, H1, table of contents, buttons, breadcrumbs, footer, FAQ, comparison tables, and code examples. Code examples can stay English if they are meant to be copied into Windsurf or Codex.

Then I compare English and Vietnamese routes. If `/blog/chatgpt-prompts-for-windsurf/` is English and `/vi/blog/chatgpt-prompts-for-windsurf/` is also mostly English, I know the issue is not the page template alone. It is probably the localization flow or missing page-specific translations.

I also inspect generated files in `site_output` and `docs`. If both are wrong, the source generator is likely wrong. If `site_output` is right but `docs` is wrong, the sync or deployment output may be stale.

Prompt example: ask Windsurf to trace the source

A good mixed-language prompt should tell Windsurf to trace the source instead of editing the final HTML only.

This is the kind of prompt I use when the Vietnamese page is not truly Vietnamese.

Inspect the English and Vietnamese versions of this static blog page. The /vi/ route still contains English headings, body copy, CTA labels, and table of contents items. Find whether the text comes from the source article template, localization module, generated docs, or sync pipeline. Fix the source generator/localizer, not only the generated HTML. Prompt/code blocks may remain English intentionally. Rebuild, sync docs, run language integrity validation, and report the files changed.

Prompt example: protect code blocks while fixing text

Sometimes translation logic accidentally touches CSS or code. I have seen a replacement for the word Cons affect the font name Consolas. That is why I tell Windsurf which parts can remain English and which parts must be translated.

This prompt is useful when a localization fix could accidentally rewrite schema, CSS, code examples, or brand names.

Fix mixed language on the visible Vietnamese page only. Do not translate code blocks, prompt examples, CSS font names, schema property names, URL slugs, or product names like ChatGPT, Windsurf, Codex, Cursor, and GitHub Copilot. Translate H1, intro, headings, table of contents labels, CTA labels, FAQ, and normal paragraphs into natural Vietnamese. Confirm English pages remain English.

Common mistakes when fixing bilingual pages

The first mistake is fixing only `docs`. That can make the live page look correct until the next build. If the source generator still contains the old text, the problem returns.

The second mistake is translating everything. Prompt examples, command names, CSS properties, JSON-LD schema keys, and product names should often remain English. Real localization is not blind replacement.

The third mistake is forgetting SEO tags. A visible Vietnamese article can still have an English meta description, breadcrumb schema, FAQ schema, or Open Graph title. That matters for search engines and social previews.

How I validate the fix

After the fix, I rebuild the site, sync `site_output` to `docs`, and run language integrity checks. I also open the target pages in the browser because some problems are visual: a language switcher can overflow, a table can be too wide, or a prompt block can break the article card.

I check that the English page remains English and that the Vietnamese page uses natural Vietnamese. I also check internal links. A Vietnamese page should usually link to `/vi/` equivalents where they exist.

If everything passes, I commit the source files and the generated `docs` output needed for GitHub Pages. I do not commit logs or unrelated generated reports unless the task specifically requires them.

FAQ

Why does Windsurf mix English and Vietnamese?

It can happen when content, templates, and localization rules are generated from different sources or when the Vietnamese route only translates shared UI labels.

Should I manually edit the Vietnamese HTML?

Only as a temporary inspection step. The durable fix should happen in the source generator or localization module.

Can prompt examples stay English on Vietnamese pages?

Yes. If the prompt is meant to be copied into Windsurf or Codex, keeping it in English can be intentional and useful.

What should I test after fixing language issues?

Check H1, title, meta description, table of contents, CTA labels, FAQ, schema, internal links, and browser layout.

How does this relate to ChatGPT prompts for Windsurf?

A clear ChatGPT debugging prompt helps Windsurf fix the right source files instead of patching the wrong output.

Next step

If you want to use this process on your own static site or app idea, start with the main workflow article, then use the checklist before sending your next prompt to Windsurf.

Read the main prompt workflowDownload the checklist

Get new AI tool reviews and comparisons.

Join the research list for new AI/SaaS review updates. This static form is prepared for a future email provider.