DEV Community

Cover image for Translation Link Fallback Test
Hassann
Hassann

Posted on • Originally published at apidog.com

Translation Link Fallback Test

This small English test post verifies two behaviors in the n8n translation pipeline: internal Apidog blog links should be rewritten to the matching locale when a translation exists, and links should fall back to English when the target article has no translation. If this appears on the live blog, delete it after validation.

Try Apidog today

Header image placeholder

What this post is for

Use this post to confirm that translated copies rewrite internal blog links correctly.

Expected behavior:

  • Japanese copies should point internal Apidog blog links to /jp/blog/...
  • Korean copies should point them to /kr/blog/...
  • Other translated copies should use their own locale prefix
  • If the linked article is not available in that locale, the link should fall back to the English version instead of returning a 404

Links that are translated nearly everywhere

These articles exist in all eleven non-English locales. In any translated copy of this post, their links should be rewritten to the local language and load successfully:

Links that are only partially translated

These two articles exist only in some languages, so they are useful for testing fallback behavior:

For example:

  • In the Japanese copy, all four Apidog links above should point to /jp/blog/... and load a real page.
  • In the French copy, get-claude-pro-for-free and llms-no-restrictions should point to /fr/blog/..., while free-cursor-ai and top-10-ai-testing should redirect to the English /blog/... versions.

A link that must not be touched

This external link points to another domain and should remain unchanged in every language: the Ghost CMS project.

If this ever becomes something like ghost.org/jp/..., the rewrite logic is too broad and is modifying external domains incorrectly.

How to verify

After publishing this post and running the translator, test a few translated versions.

1. Check Japanese links

In the Japanese copy, every Apidog blog link should use this pattern:

/jp/blog/{slug}/
Enter fullscreen mode Exit fullscreen mode

Each link should return a valid page with HTTP 200.

2. Check French fallback behavior

In the French copy:

  • get-claude-pro-for-free should resolve to /fr/blog/...
  • llms-no-restrictions should resolve to /fr/blog/...
  • free-cursor-ai should redirect to the English /blog/... version
  • top-10-ai-testing should redirect to the English /blog/... version

3. Check the external Ghost link

The Ghost link should remain exactly:

https://ghost.org/
Enter fullscreen mode Exit fullscreen mode

This should be true in every translated copy.

4. Check metadata

Every translated copy should include:

  • The Tutorials category
  • A translated excerpt

Neither field should be blank.

Cleanup

After all checks pass, delete this post and its translations from Ghost. This content is only for validating the translation and link-rewrite pipeline.

Top comments (0)