Docs
Protocol Verified

Global Authority: i18n & SEO

Strategy for multi-language SEO synchronization and engineering integrity.

PRID: 1204
VERIFIED
1 min read

🌐 Global Authority: i18n & Multi-language Strategy

Multilingual support is one of Instant Ship™'s core competencies. We not only provide translation capabilities but also implement SEO semantic synchronization and engineering integrity checks at the core.

1. Core Mechanism

  • i18next: Responsible for UI text replacement within the application.
  • Physical Isolation: Translation dictionaries are stored under locales/{en,zh}/ and split by functional modules.
  • SEO Auto-injection: Automatically generates the following based on the locales array in site.config.ts:
    • <link rel="alternate" hreflang="xx" />
    • <link rel="alternate" hreflang="x-default" />
    • <html lang="xx" /> (dynamically updated)

2. Engineering Integrity Check (Anti-Entropy)

To completely eliminate "mixed Chinese and English" or translation omissions, we have introduced an automated checking mechanism.

A. check-i18n Script

Run npm run check-i18n to start the built-in validator. This script will:

  1. Scan Resource Tree: Read all merged language resources in i18n.ts.
  2. Structural Comparison: Expand all language keys into flat paths (e.g., common.pricing.title).
  3. Difference Alert:
    • Missing Key: If the English version has a key that the Chinese version does not.
    • Empty Value: If the key exists but its value is an empty string.

Authority Distribution

Share this technical artifact